BUGFIX Fixed singleton() call in TestRunner?, it fails on PHP 5.2.5 with a ReflectionException? as it passes constructor arguments (merged from branches/2.3-nzct)

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@82065 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Ingo Schommer 2009-07-16 23:56:36 +00:00
parent 4499420ff2
commit 1f19dcdfad

View File

@ -139,7 +139,7 @@ class TestRunner extends Controller {
} else {
$classNames = explode(',', $request->param('TestCase'));
foreach($classNames as $className) {
if(!class_exists($className) || !(singleton($className) instanceof SapphireTest)) {
if(!class_exists($className) || !is_subclass_of($className, 'SapphireTest')) {
user_error("TestRunner::only(): Invalid TestCase '$className', cannot find matching class", E_USER_ERROR);
}
}