Free some memory in unit tests

This commit is contained in:
Val Bancer 2018-08-13 12:26:26 +02:00 committed by GitHub
parent 87677d7004
commit 8bfdcdb637
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -418,4 +418,18 @@ abstract class ControllerTestCase extends CakeTestCase {
return $this->controller; return $this->controller;
} }
/**
* Unsets some properties to free memory.
*
* @return void
*/
public function tearDown() {
parent::tearDown();
unset($this->contents);
unset($this->controller);
unset($this->headers);
unset($this->result);
unset($this->view);
unset($this->vars);
}
} }