mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
fix misleading error message with test class
This commit is contained in:
parent
20582936d8
commit
1354edf054
@ -215,9 +215,10 @@ class FixtureTestState implements TestState
|
||||
*/
|
||||
protected function getTestAbsolutePath(SapphireTest $test)
|
||||
{
|
||||
$filename = ClassLoader::inst()->getItemPath(get_class($test));
|
||||
$class = get_class($test);
|
||||
$filename = ClassLoader::inst()->getItemPath($class);
|
||||
if (!$filename) {
|
||||
throw new LogicException('getItemPath returned null for ' . static::class
|
||||
throw new LogicException('getItemPath returned null for ' . $class
|
||||
. '. Try adding flush=1 to the test run.');
|
||||
}
|
||||
return dirname($filename ?? '');
|
||||
|
Loading…
x
Reference in New Issue
Block a user