Free some memory in unit tests

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

View file

@ -84,6 +84,8 @@ abstract class CakeTestCase extends PHPUnit_Framework_TestCase {
$result = parent::run($result);
if (!empty($this->fixtureManager)) {
$this->fixtureManager->unload($this);
unset($this->fixtureManager);
unset($this->fixtures);
}
for ($i = ob_get_level(); $i < $level; ++$i) {
@ -164,6 +166,8 @@ abstract class CakeTestCase extends PHPUnit_Framework_TestCase {
if (isset($_GET['debug']) && $_GET['debug']) {
ob_flush();
}
unset($this->_configure);
unset($this->_pathRestore);
}
/**