diff --git a/cake/tests/cases/libs/test_manager.test.php b/cake/tests/cases/libs/test_manager.test.php index 787259e6b..898817233 100644 --- a/cake/tests/cases/libs/test_manager.test.php +++ b/cake/tests/cases/libs/test_manager.test.php @@ -35,8 +35,8 @@ class TestManagerTest extends CakeTestCase { * @access public */ function setUp() { - $this->Sut = new TestManager(); - $this->Reporter = new CakeHtmlReporter(); + $this->Sut =& new TestManager(); + $this->Reporter =& new CakeHtmlReporter(); } /** * undocumented function @@ -45,14 +45,14 @@ class TestManagerTest extends CakeTestCase { * @access public */ function testRunAllTests() { - $folder = new Folder($this->Sut->_getTestsPath()); + $folder =& new Folder($this->Sut->_getTestsPath()); $extension = str_replace('.', '\.', TestManager::getExtension('test')); $out = $folder->findRecursive('.*' . $extension); - $reporter = new CakeHtmlReporter(); + $reporter =& new CakeHtmlReporter(); $list = TestManager::runAllTests($reporter, true); - $this->assertEqual(count($out), count($list->_test_cases)); + $this->assertEqual(count($out), count($list)); } /** * undocumented function diff --git a/cake/tests/groups/test_suite.group.php b/cake/tests/groups/test_suite.group.php index b1c126114..42aaaa1e4 100644 --- a/cake/tests/groups/test_suite.group.php +++ b/cake/tests/groups/test_suite.group.php @@ -52,6 +52,7 @@ class TestSuiteGroupTest extends GroupTest { * @return void */ function TestSuiteGroupTest() { + TestManager::addTestFile($this, CORE_TEST_CASES . DS . 'libs' . DS . 'test_manager'); TestManager::addTestFile($this, CORE_TEST_CASES . DS . 'libs' . DS . 'code_coverage_manager'); TestManager::addTestFile($this, CORE_TEST_CASES . DS . 'libs' . DS . 'cake_test_case'); TestManager::addTestFile($this, CORE_TEST_CASES . DS . 'libs' . DS . 'cake_test_fixture'); diff --git a/cake/tests/lib/cake_test_case.php b/cake/tests/lib/cake_test_case.php index 1fa560ad6..8a183719c 100644 --- a/cake/tests/lib/cake_test_case.php +++ b/cake/tests/lib/cake_test_case.php @@ -269,9 +269,7 @@ class CakeTestCase extends UnitTestCase { ? array_intersect_key($_GET, $toSave) : $this->__savedGetData; - $data = (!empty($params['data'])) - ? $params['data'] - : array(); + $data = (!empty($params['data'])) ? $params['data'] : array(); if (strtolower($params['method']) == 'get') { $_GET = array_merge($this->__savedGetData, $data); diff --git a/cake/tests/lib/test_manager.php b/cake/tests/lib/test_manager.php index e19a66d18..99a590ddd 100644 --- a/cake/tests/lib/test_manager.php +++ b/cake/tests/lib/test_manager.php @@ -88,12 +88,12 @@ class TestManager { $test =& new GroupTest('All Core Tests'); } - foreach ($testCases as $testCase) { - $test->addTestFile($testCase); + if ($testing) { + return $testCases; } - if ($testing) { - return $test; + foreach ($testCases as $testCase) { + $test->addTestFile($testCase); } return $test->run($reporter);