patch addslashes for windows paths

This commit is contained in:
jordanbrauer
2021-02-13 12:48:43 -06:00
parent dd94a843b5
commit 9a0240bc7b

View File

@ -171,7 +171,7 @@ final class TestCaseFactory
}, $filename); }, $filename);
} }
$filename = addslashes((string) realpath($filename)); $filename = str_replace('\\\\', '\\', addslashes((string) realpath($filename)));
$rootPath = TestSuite::getInstance()->rootPath; $rootPath = TestSuite::getInstance()->rootPath;
$relativePath = str_replace($rootPath . DIRECTORY_SEPARATOR, '', $filename); $relativePath = str_replace($rootPath . DIRECTORY_SEPARATOR, '', $filename);
$relativePath = dirname(ucfirst($relativePath)) . DIRECTORY_SEPARATOR . basename($relativePath, '.php'); $relativePath = dirname(ucfirst($relativePath)) . DIRECTORY_SEPARATOR . basename($relativePath, '.php');