From aef4820abec037e9d182f64c04327b881eb11e05 Mon Sep 17 00:00:00 2001 From: Niels Keurentjes Date: Tue, 26 Jan 2016 09:08:57 +0100 Subject: [PATCH] Normalization of URLs caused discrepancy on Windows with unit tests. --- tests/Composer/Test/Repository/PathRepositoryTest.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/Composer/Test/Repository/PathRepositoryTest.php b/tests/Composer/Test/Repository/PathRepositoryTest.php index 47b7ac24f..e76be2bfa 100644 --- a/tests/Composer/Test/Repository/PathRepositoryTest.php +++ b/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(), '/')); } }