From f0f932fca403267a141e91f9262ab649b95b2ed9 Mon Sep 17 00:00:00 2001 From: Jordi Boggiano Date: Sat, 10 Sep 2016 12:52:23 +0200 Subject: [PATCH] Fix classmap test on windows --- tests/Composer/Test/Autoload/ClassMapGeneratorTest.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/Composer/Test/Autoload/ClassMapGeneratorTest.php b/tests/Composer/Test/Autoload/ClassMapGeneratorTest.php index 36f3bcfd5..c4d38a4f9 100644 --- a/tests/Composer/Test/Autoload/ClassMapGeneratorTest.php +++ b/tests/Composer/Test/Autoload/ClassMapGeneratorTest.php @@ -223,12 +223,13 @@ class ClassMapGeneratorTest extends TestCase $tempDir = self::getUniqueTmpDirectory(); $resultFile = $tempDir . '/result.txt'; - $fileInDirectory = $tempDir . '/TestClass.php'; + $fileInDirectory = $tempDir . DIRECTORY_SEPARATOR . 'TestClass.php'; file_put_contents($fileInDirectory, ""); ClassMapGenerator::dump(array($tempDir), $resultFile); + $fileInDirectory = str_replace('\\', '\\\\', $fileInDirectory); $this->assertEquals(" '$fileInDirectory',\n);", file_get_contents($resultFile)); $fs = new Filesystem();