diff --git a/packages/documentator/src/Preprocessor/Targets/DirectoryPathTest.php b/packages/documentator/src/Preprocessor/Targets/DirectoryPathTest.php index 550844a1..22466619 100644 --- a/packages/documentator/src/Preprocessor/Targets/DirectoryPathTest.php +++ b/packages/documentator/src/Preprocessor/Targets/DirectoryPathTest.php @@ -2,6 +2,7 @@ namespace LastDragon_ru\LaraASP\Documentator\Preprocessor\Targets; +use LastDragon_ru\LaraASP\Core\Utils\Path; use LastDragon_ru\LaraASP\Documentator\Preprocessor\Context; use LastDragon_ru\LaraASP\Documentator\Preprocessor\Exceptions\TargetIsNotDirectory; use LastDragon_ru\LaraASP\Documentator\Testing\Package\TestCase; @@ -21,7 +22,10 @@ public function testResolveRelative(): void { $context = new Context($dir, $target, null); $resolver = new DirectoryPath(); - self::assertSame($dir, $resolver->resolve($context, $params)); + self::assertSame( + Path::normalize($dir), + $resolver->resolve($context, $params), + ); } public function testResolveAbsolute(): void { @@ -31,7 +35,10 @@ public function testResolveAbsolute(): void { $context = new Context($dir, $target, null); $resolver = new DirectoryPath(); - self::assertSame($dir, $resolver->resolve($context, $params)); + self::assertSame( + Path::normalize($dir), + $resolver->resolve($context, $params), + ); } public function testResolveNotADirectory(): void { @@ -44,6 +51,6 @@ public function testResolveNotADirectory(): void { self::expectException(TargetIsNotDirectory::class); self::expectExceptionMessage("The `{$target}` is not a directory (in `{$dir}`)."); - self::assertSame($dir, $resolver->resolve($context, $params)); + $resolver->resolve($context, $params); } } diff --git a/packages/documentator/src/Preprocessor/Targets/FilePathTest.php b/packages/documentator/src/Preprocessor/Targets/FilePathTest.php index 902fdc06..79d5d839 100644 --- a/packages/documentator/src/Preprocessor/Targets/FilePathTest.php +++ b/packages/documentator/src/Preprocessor/Targets/FilePathTest.php @@ -2,6 +2,7 @@ namespace LastDragon_ru\LaraASP\Documentator\Preprocessor\Targets; +use LastDragon_ru\LaraASP\Core\Utils\Path; use LastDragon_ru\LaraASP\Documentator\Preprocessor\Context; use LastDragon_ru\LaraASP\Documentator\Preprocessor\Exceptions\TargetIsNotFile; use LastDragon_ru\LaraASP\Documentator\Testing\Package\TestCase; @@ -21,7 +22,10 @@ public function testResolveRelative(): void { $context = new Context($file, $target, null); $resolver = new FilePath(); - self::assertSame($file, $resolver->resolve($context, $params)); + self::assertSame( + Path::normalize($file), + $resolver->resolve($context, $params), + ); } public function testResolveAbsolute(): void { @@ -31,7 +35,10 @@ public function testResolveAbsolute(): void { $context = new Context($file, $target, null); $resolver = new FilePath(); - self::assertSame($file, $resolver->resolve($context, $params)); + self::assertSame( + Path::normalize($file), + $resolver->resolve($context, $params), + ); } public function testResolveNotAFile(): void { @@ -44,6 +51,6 @@ public function testResolveNotAFile(): void { self::expectException(TargetIsNotFile::class); self::expectExceptionMessage("The `{$target}` is not a file (in `{$file}`)."); - self::assertSame($file, $resolver->resolve($context, $params)); + $resolver->resolve($context, $params); } }