Skip to content

Commit 46f343e

Browse files
authored
Normalize path in TypeInferenceTestCase
1 parent b3aec7c commit 46f343e

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

tests/PHPStan/Analyser/NodeScopeResolverTest.php

+4
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
namespace PHPStan\Analyser;
44

55
use EnumTypeAssertions\Foo;
6+
use PHPStan\File\FileHelper;
67
use PHPStan\Testing\TypeInferenceTestCase;
78
use stdClass;
89
use function array_shift;
@@ -209,7 +210,10 @@ public static function dataFile(): iterable
209210
$base = dirname(__DIR__, 3) . '/';
210211
$baseLength = strlen($base);
211212

213+
$fileHelper = new FileHelper($base);
212214
foreach (self::findTestFiles() as $file) {
215+
$file = $fileHelper->normalizePath($file);
216+
213217
$testName = $file;
214218
if (str_starts_with($file, $base)) {
215219
$testName = substr($file, $baseLength);

0 commit comments

Comments
 (0)