{"id":332,"date":"2019-09-29T12:09:18","date_gmt":"2019-09-29T18:09:18","guid":{"rendered":"http:\/\/boulderinformationservices.com\/blog\/?p=332"},"modified":"2019-09-30T09:31:48","modified_gmt":"2019-09-30T15:31:48","slug":"cakephp-2-10-is-not-cleaning-up-fixtures","status":"publish","type":"post","link":"https:\/\/boulderinformationservices.com\/blog\/cakephp-2-10-is-not-cleaning-up-fixtures\/","title":{"rendered":"CakePHP 2.10 is not cleaning up fixtures"},"content":{"rendered":"\n<p>CakePHP has infrastructure to remove tables created in the test database as fixtures. The documentation implies that these tables will be removed as part of the test cleanup. But it is not happening. Here is where it fails. This class is CakeTestRunner<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"834\" height=\"376\" src=\"https:\/\/boulderinformationservices.com\/blog\/wp-content\/uploads\/image.png\" alt=\"\" class=\"wp-image-333\" srcset=\"https:\/\/boulderinformationservices.com\/blog\/wp-content\/uploads\/image.png 834w, https:\/\/boulderinformationservices.com\/blog\/wp-content\/uploads\/image-300x135.png 300w, https:\/\/boulderinformationservices.com\/blog\/wp-content\/uploads\/image-768x346.png 768w\" sizes=\"(max-width: 834px) 100vw, 834px\" \/><\/figure>\n\n\n\n<p>The fixture manager would remove the tables at <code>$fixture-&gt;shutdown();<\/code> but it&#8217;s not happening because the line above calls <code>doRun<\/code> without passing <code>false<\/code> as the third parameter. Therefore, <code>doRun<\/code> exits and the fixtures are never removed. And because the third parameter is missing &#8212; that is, because it is is not surfaced to my own code &#8212; it cannot be overridden.<\/p>\n\n\n\n<p>Not sure if this is a bug or a feature or &#8230; ?<\/p>\n","protected":false},"excerpt":{"rendered":"<p>CakePHP has infrastructure to remove tables created in the test database as fixtures. The documentation implies that these tables will be removed as part of the test cleanup. But it is not happening. Here is where it fails. This class &hellip; <a href=\"https:\/\/boulderinformationservices.com\/blog\/cakephp-2-10-is-not-cleaning-up-fixtures\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"_links":{"self":[{"href":"https:\/\/boulderinformationservices.com\/blog\/wp-json\/wp\/v2\/posts\/332"}],"collection":[{"href":"https:\/\/boulderinformationservices.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/boulderinformationservices.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/boulderinformationservices.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/boulderinformationservices.com\/blog\/wp-json\/wp\/v2\/comments?post=332"}],"version-history":[{"count":2,"href":"https:\/\/boulderinformationservices.com\/blog\/wp-json\/wp\/v2\/posts\/332\/revisions"}],"predecessor-version":[{"id":336,"href":"https:\/\/boulderinformationservices.com\/blog\/wp-json\/wp\/v2\/posts\/332\/revisions\/336"}],"wp:attachment":[{"href":"https:\/\/boulderinformationservices.com\/blog\/wp-json\/wp\/v2\/media?parent=332"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/boulderinformationservices.com\/blog\/wp-json\/wp\/v2\/categories?post=332"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/boulderinformationservices.com\/blog\/wp-json\/wp\/v2\/tags?post=332"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}