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

This commit is contained in:
umpirsky 2011-01-07 15:02:22 +01:00 committed by Fabien Potencier
parent bc2ca8f1cf
commit 0faf067acb

View File

@ -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');