Skip to content
Browse files

Updating all group tests to extend TestSuite instead of the deprecate…

…d GroupTest class. Updating the TestManager.
  • Loading branch information...
1 parent e47316e commit e9c747badc3d81e956407eb906f1ad046f4d2107 @markstory markstory committed
View
2 cake/tests/groups/acl.group.php
@@ -34,7 +34,7 @@
* @package cake
* @subpackage cake.tests.groups
*/
-class AclAndAuthGroupTest extends GroupTest {
+class AclAndAuthGroupTest extends TestSuite {
/**
* label property
View
2 cake/tests/groups/bake.group.php
@@ -29,7 +29,7 @@
* @package cake
* @subpackage cake.tests.groups
*/
-class BakeGroupTest extends GroupTest {
+class BakeGroupTest extends TestSuite {
/**
* label property
View
2 cake/tests/groups/cache.group.php
@@ -34,7 +34,7 @@
* @package cake
* @subpackage cake.tests.groups
*/
-class CacheGroupTest extends GroupTest {
+class CacheGroupTest extends TestSuite {
/**
* label property
View
2 cake/tests/groups/components.group.php
@@ -34,7 +34,7 @@
* @package cake
* @subpackage cake.tests.groups
*/
-class ComponentsGroupTest extends GroupTest {
+class ComponentsGroupTest extends TestSuite {
/**
* label property
View
2 cake/tests/groups/configure.group.php
@@ -34,7 +34,7 @@
* @package cake
* @subpackage cake.tests.groups
*/
-class ConfigureGroupTest extends GroupTest {
+class ConfigureGroupTest extends TestSuite {
/**
* label property
View
2 cake/tests/groups/console.group.php
@@ -34,7 +34,7 @@
* @package cake
* @subpackage cake.tests.groups
*/
-class ConsoleGroupTest extends GroupTest {
+class ConsoleGroupTest extends TestSuite {
/**
* label property
View
2 cake/tests/groups/controller.group.php
@@ -32,7 +32,7 @@
* @package cake
* @subpackage cake.tests.groups
*/
-class ControllerGroupTest extends GroupTest {
+class ControllerGroupTest extends TestSuite {
/**
* label property
View
2 cake/tests/groups/database.group.php
@@ -35,7 +35,7 @@
* @package cake
* @subpackage cake.tests.groups
*/
-class DatabaseGroupTest extends GroupTest {
+class DatabaseGroupTest extends TestSuite {
/**
* label property
View
2 cake/tests/groups/helpers.group.php
@@ -34,7 +34,7 @@
* @package cake
* @subpackage cake.tests.groups
*/
-class HelpersGroupTest extends GroupTest {
+class HelpersGroupTest extends TestSuite {
/**
* label property
View
2 cake/tests/groups/javascript.group.php
@@ -28,7 +28,7 @@
* @package cake
* @subpackage cake.tests.groups
*/
-class AllCoreJavascriptHelpersGroupTest extends GroupTest {
+class AllCoreJavascriptHelpersGroupTest extends TestSuite {
/**
* label property
*
View
2 cake/tests/groups/lib.group.php
@@ -34,7 +34,7 @@
* @package cake
* @subpackage cake.tests.groups
*/
-class LibGroupTest extends GroupTest {
+class LibGroupTest extends TestSuite {
/**
* label property
View
2 cake/tests/groups/model.group.php
@@ -35,7 +35,7 @@
* @package cake
* @subpackage cake.tests.groups
*/
-class ModelGroupTest extends GroupTest {
+class ModelGroupTest extends TestSuite {
/**
* label property
View
2 cake/tests/groups/no_cross_contamination.group.php
@@ -36,7 +36,7 @@
* @package cake
* @subpackage cake.tests.groups
*/
-class NoCrossContaminationGroupTest extends GroupTest {
+class NoCrossContaminationGroupTest extends TestSuite {
/**
* label property
View
2 cake/tests/groups/no_database.group.php
@@ -34,7 +34,7 @@
* @package cake
* @subpackage cake.tests.groups
*/
-class NoDatabaseGroupTest extends GroupTest {
+class NoDatabaseGroupTest extends TestSuite {
/**
* label property
View
2 cake/tests/groups/routing_system.group.php
@@ -34,7 +34,7 @@
* @package cake
* @subpackage cake.tests.groups
*/
-class RoutingSystemGroupTest extends GroupTest {
+class RoutingSystemGroupTest extends TestSuite {
/**
* label property
View
2 cake/tests/groups/socket.group.php
@@ -40,7 +40,7 @@
* @package cake
* @subpackage cake.tests.groups
*/
-class SocketGroupTest extends GroupTest {
+class SocketGroupTest extends TestSuite {
/**
* label property
View
2 cake/tests/groups/test_suite.group.php
@@ -34,7 +34,7 @@
* @package cake
* @subpackage cake.tests.groups
*/
-class TestSuiteGroupTest extends GroupTest {
+class TestSuiteGroupTest extends TestSuite {
/**
* label property
View
2 cake/tests/groups/view.group.php
@@ -34,7 +34,7 @@
* @package cake
* @subpackage cake.tests.groups
*/
-class ViewsGroupTest extends GroupTest {
+class ViewsGroupTest extends TestSuite {
/**
* label property
View
2 cake/tests/groups/xml.group.php
@@ -34,7 +34,7 @@
* @package cake
* @subpackage cake.tests.groups
*/
-class XmlGroupTest extends GroupTest {
+class XmlGroupTest extends TestSuite {
/**
* label property
View
15 cake/tests/lib/test_manager.php
@@ -86,11 +86,11 @@ function runAllTests(&$reporter, $testing = false) {
$testCases =& $manager->_getTestFileList($manager->_getTestsPath());
if ($manager->appTest) {
- $test =& new GroupTest('All App Tests');
+ $test =& new TestSuite('All App Tests');
} else if ($manager->pluginTest) {
- $test =& new GroupTest('All ' . Inflector::humanize($manager->pluginTest) . ' Plugin Tests');
+ $test =& new TestSuite('All ' . Inflector::humanize($manager->pluginTest) . ' Plugin Tests');
} else {
- $test =& new GroupTest('All Core Tests');
+ $test =& new TestSuite('All Core Tests');
}
if ($testing) {
@@ -126,7 +126,7 @@ function runTestCase($testCaseFile, &$reporter, $testing = false) {
return true;
}
- $test =& new GroupTest("Individual test case: " . $testCaseFile);
+ $test =& new TestSuite("Individual test case: " . $testCaseFile);
$test->addTestFile($testCaseFileWithPath);
return $test->run($reporter);
}
@@ -148,7 +148,7 @@ function runGroupTest($groupTestName, &$reporter) {
}
require_once $filePath;
- $test =& new GroupTest($groupTestName . ' group test');
+ $test =& new TestSuite($groupTestName . ' group test');
foreach ($manager->_getGroupTestClassNames($filePath) as $groupTest) {
$testCase = new $groupTest();
$test->addTestCase($testCase);
@@ -273,12 +273,13 @@ function &_getTestGroupList($directory = '.') {
*/
function &_getGroupTestClassNames($groupTestFile) {
$file = implode("\n", file($groupTestFile));
- preg_match("~lass\s+?(.*)\s+?extends GroupTest~", $file, $matches);
+ preg_match("~lass\s+?(.*)\s+?extends TestSuite~", $file, $matches);
if (!empty($matches)) {
unset($matches[0]);
return $matches;
}
- return array();
+ $matches = array();
+ return $matches;
}
/**

0 comments on commit e9c747b

Please sign in to comment.
Something went wrong with that request. Please try again.