mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
BUGFIX Limited error message scope on invalid classname for TestRunner
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@64013 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
ad3f0f400f
commit
9a298e1592
@ -111,10 +111,10 @@ 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)) {
|
||||
if(!(singleton($className) instanceof SapphireTest)) {
|
||||
user_error("TestRunner::only(): Invalid TestCase '$className', cannot find matching class", E_USER_ERROR);
|
||||
}
|
||||
$this->runTests(array($className));
|
||||
} else {
|
||||
if ($className == 'all') $this->all();
|
||||
@ -219,6 +219,7 @@ HTML;
|
||||
}
|
||||
|
||||
$dbname = SapphireTest::create_temp_db();
|
||||
|
||||
DB::set_alternative_database_name($dbname);
|
||||
|
||||
$fixture = new YamlFixture($_GET['fixture']);
|
||||
|
Loading…
x
Reference in New Issue
Block a user