소스 검색

Fix classmap test on windows

Jordi Boggiano 8 년 전
부모
커밋
f0f932fca4
1개의 변경된 파일2개의 추가작업 그리고 1개의 파일을 삭제
  1. 2 1
      tests/Composer/Test/Autoload/ClassMapGeneratorTest.php

+ 2 - 1
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, "<?php class TestClass {} ?>");
 
         ClassMapGenerator::dump(array($tempDir), $resultFile);
 
+        $fileInDirectory = str_replace('\\', '\\\\', $fileInDirectory);
         $this->assertEquals("<?php return array (\n  'TestClass' => '$fileInDirectory',\n);", file_get_contents($resultFile));
 
         $fs = new Filesystem();