diff --git a/src/Factories/TestCaseFactory.php b/src/Factories/TestCaseFactory.php index 3f6e4f0d..05859fdd 100644 --- a/src/Factories/TestCaseFactory.php +++ b/src/Factories/TestCaseFactory.php @@ -165,6 +165,7 @@ final class TestCaseFactory }, $filename); } + $filename = realpath($filename); $rootPath = TestSuite::getInstance()->rootPath; $relativePath = str_replace($rootPath . DIRECTORY_SEPARATOR, '', $filename); // Strip out any %-encoded octets. diff --git a/src/TestSuite.php b/src/TestSuite.php index 2d2bbfd8..e3d9f772 100644 --- a/src/TestSuite.php +++ b/src/TestSuite.php @@ -83,7 +83,7 @@ final class TestSuite $this->afterEach = new AfterEachRepository(); $this->afterAll = new AfterAllRepository(); - $this->rootPath = $rootPath; + $this->rootPath = realpath($rootPath); } /**