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:
Ingo Schommer 2009-07-02 00:17:29 +00:00
parent f41e2b474c
commit 54f8ece2e7

View File

@ -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;
}
}
}