diff --git a/cake/tests/lib/cake_test_suite.php b/cake/tests/lib/cake_test_suite.php index 98ec1a5a1..414fd8ace 100644 --- a/cake/tests/lib/cake_test_suite.php +++ b/cake/tests/lib/cake_test_suite.php @@ -43,8 +43,6 @@ class CakeTestSuite extends PHPUnit_Framework_TestSuite { */ protected function setUp() { parent::setUp(); - restore_error_handler(); - restore_error_handler(); if (!$this->_fixtureManager) { return; } diff --git a/cake/tests/lib/test_manager.php b/cake/tests/lib/test_manager.php index 7cb1c191f..0c0d0b612 100644 --- a/cake/tests/lib/test_manager.php +++ b/cake/tests/lib/test_manager.php @@ -184,6 +184,9 @@ class TestManager { * @return mixed Results of group test being run. */ protected function run($reporter, $codeCoverage = false) { + restore_error_handler(); + restore_error_handler(); + $result = new PHPUnit_Framework_TestResult; $result->collectCodeCoverageInformation($codeCoverage); $result->addListener($reporter);