Fixed FileTest::testRename to work for windows file system.
This commit is contained in:
parent
bc2ca8f1cf
commit
0faf067acb
@ -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');
|
||||
|
Reference in New Issue
Block a user