From 1f19dcdfad29b08743db2f5c0c25fea5c1cf07ff Mon Sep 17 00:00:00 2001 From: Ingo Schommer Date: Thu, 16 Jul 2009 23:56:36 +0000 Subject: [PATCH] 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 --- dev/TestRunner.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dev/TestRunner.php b/dev/TestRunner.php index caa0d27be..98ae3ad0a 100644 --- a/dev/TestRunner.php +++ b/dev/TestRunner.php @@ -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); } }