From 727aac1713d73d28e65da914b94c385826f3c0d6 Mon Sep 17 00:00:00 2001 From: Val Bancer Date: Mon, 13 Aug 2018 15:06:19 +0200 Subject: [PATCH] Move unset to the proper place --- lib/Cake/TestSuite/CakeTestCase.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/Cake/TestSuite/CakeTestCase.php b/lib/Cake/TestSuite/CakeTestCase.php index f99b5b618e1..beabf30b8ea 100644 --- a/lib/Cake/TestSuite/CakeTestCase.php +++ b/lib/Cake/TestSuite/CakeTestCase.php @@ -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) { @@ -165,8 +167,6 @@ public function tearDown() { ob_flush(); } unset($this->db); - unset($this->fixtureManager); - unset($this->fixtures); unset($this->_configure); unset($this->_pathRestore); }