mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
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:
parent
4499420ff2
commit
1f19dcdfad
@ -139,7 +139,7 @@ class TestRunner extends Controller {
|
|||||||
} else {
|
} else {
|
||||||
$classNames = explode(',', $request->param('TestCase'));
|
$classNames = explode(',', $request->param('TestCase'));
|
||||||
foreach($classNames as $className) {
|
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);
|
user_error("TestRunner::only(): Invalid TestCase '$className', cannot find matching class", E_USER_ERROR);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user