From a0b80826315f7457011f01bd1281f597fe5b48f2 Mon Sep 17 00:00:00 2001 From: Dimitrios Karvounaris Date: Tue, 2 Jun 2020 18:01:43 +0200 Subject: [PATCH] Fix issue with case-insensitive windows paths --- src/Factories/TestCaseFactory.php | 1 + src/TestSuite.php | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) 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); } /**