Skip to content

Commit

Permalink
Free some memory in unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
bancer committed Aug 13, 2018
1 parent 8bfdcdb commit dbbc840
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/Cake/TestSuite/CakeTestCase.php
Expand Up @@ -84,6 +84,8 @@ public function run(PHPUnit_Framework_TestResult $result = null) {
$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) {
Expand Down Expand Up @@ -164,6 +166,8 @@ public function tearDown() {
if (isset($_GET['debug']) && $_GET['debug']) {
ob_flush();
}
unset($this->_configure);
unset($this->_pathRestore);
}

/**
Expand Down

0 comments on commit dbbc840

Please sign in to comment.