浏览代码

Fix test on windows

Jordi Boggiano 10 年之前
父节点
当前提交
46d8e50bf3
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      tests/Composer/Test/InstallerTest.php

+ 1 - 1
tests/Composer/Test/InstallerTest.php

@@ -292,7 +292,7 @@ class InstallerTest extends TestCase
 
                             // Change paths like file://foobar to file:///path/to/fixtures
                             if (preg_match('{^file://[^/]}', $repo['url'])) {
-                                $repo['url'] = "file://${fixturesDir}/" . substr($repo['url'], 7);
+                                $repo['url'] = 'file://' . strtr($fixturesDir, '\\', '/') . '/' . substr($repo['url'], 7);
                             }
 
                             unset($repo);