mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
BUGFIX Checking for class_exists() when collating testable classes in TestRunner
ENHANCEMENT Removing space from TestRunner header output listing classnames, to make them easier to copy/paste into a custom test run command (which accepts comma-separated arguments, but has trouble with spaces) git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@80799 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
f41e2b474c
commit
54f8ece2e7
@ -158,7 +158,9 @@ class TestRunner extends Controller {
|
||||
foreach($moduleNames as $moduleName) {
|
||||
$classesForModule = ClassInfo::classes_for_folder($moduleName);
|
||||
if($classesForModule) foreach($classesForModule as $class) {
|
||||
if(is_subclass_of($class, 'SapphireTest')) $classNames[] = $class;
|
||||
if(class_exists($class) && is_subclass_of($class, 'SapphireTest')) {
|
||||
$classNames[] = $class;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -202,7 +204,7 @@ class TestRunner extends Controller {
|
||||
|
||||
self::$default_reporter->writeHeader("Sapphire Test Runner");
|
||||
if (count($classList) > 1) {
|
||||
self::$default_reporter->writeInfo("All Tests", "Running test cases: " . implode(", ", $classList));
|
||||
self::$default_reporter->writeInfo("All Tests", "Running test cases: " . implode(",", $classList));
|
||||
} else {
|
||||
self::$default_reporter->writeInfo($classList[0], "");
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user