소스 검색

Normalization of URLs caused discrepancy on Windows with unit tests.

Niels Keurentjes 9 년 전
부모
커밋
aef4820abe
1개의 변경된 파일4개의 추가작업 그리고 1개의 파일을 삭제
  1. 4 1
      tests/Composer/Test/Repository/PathRepositoryTest.php

+ 4 - 1
tests/Composer/Test/Repository/PathRepositoryTest.php

@@ -101,6 +101,9 @@ class PathRepositoryTest extends TestCase
 
         $package = $packages[0];
         $this->assertEquals('test/path-versioned', $package->getName());
-        $this->assertEquals(rtrim($relativeUrl, DIRECTORY_SEPARATOR), rtrim($package->getDistUrl(), DIRECTORY_SEPARATOR));
+
+        // Convert platform specific separators back to generic URL slashes
+        $relativeUrl = str_replace(DIRECTORY_SEPARATOR, '/', $relativeUrl);
+        $this->assertEquals(rtrim($relativeUrl, '/'), rtrim($package->getDistUrl(), '/'));
     }
 }