Merge pull request #10590 from wilr/4

This commit is contained in:
Michal Kleiner 2022-11-25 09:58:14 +13:00 committed by GitHub
commit f05cc1fcd6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 2 deletions

View File

@ -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 ?? '');