浏览代码

Fixed FileTest::testRename to work for windows file system.

umpirsky 14 年之前
父节点
当前提交
0faf067acb
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      tests/Symfony/Tests/Component/HttpFoundation/File/FileTest.php

+ 2 - 2
tests/Symfony/Tests/Component/HttpFoundation/File/FileTest.php

@@ -96,10 +96,10 @@ class FileTest extends \PHPUnit_Framework_TestCase
     public function testRename()
     {
         $path = __DIR__.'/Fixtures/test.copy.gif';
-        $targetPath = __DIR__.strtr('/Fixtures/test.target.gif', '/', DIRECTORY_SEPARATOR);
+        $targetPath = realpath(__DIR__.'/Fixtures').DIRECTORY_SEPARATOR.'test.target.gif';
         @unlink($path);
         @unlink($targetPath);
-        copy(__DIR__.'/Fixtures/test.gif', $path);
+        copy(realpath(__DIR__.'/Fixtures/test.gif'), $path);
 
         $file = new File($path);
         $file->rename('test.target.gif');