mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
ENHANCEMENT Improved error message on invalid classname for TestRunner
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@64012 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
757e0ed755
commit
ad3f0f400f
@ -111,6 +111,9 @@ class TestRunner extends Controller {
|
||||
*/
|
||||
function only($request) {
|
||||
$className = $request->param('TestCase');
|
||||
if(!$className || !ClassInfo::exists($className) || !(singleton($className) instanceof SapphireTest)) {
|
||||
user_error("TestRunner::only(): Invalid TestCase '$className', cannot find matching class", E_USER_ERROR);
|
||||
}
|
||||
if(class_exists($className)) {
|
||||
$this->runTests(array($className));
|
||||
} else {
|
||||
|
Loading…
x
Reference in New Issue
Block a user