[HttpFoundation] Fixed tests for windows

This commit is contained in:
Jordi Boggiano 2010-11-17 23:59:03 +01:00 committed by Fabien Potencier
parent b2bd7ce57d
commit 7a255fe39f

View File

@ -17,7 +17,7 @@ class FileTest extends \PHPUnit_Framework_TestCase
public function testGetPathReturnsAbsolutePath()
{
$this->assertEquals(__DIR__.'/Fixtures/test.gif', $this->file->getPath());
$this->assertEquals(__DIR__.DIRECTORY_SEPARATOR.'Fixtures'.DIRECTORY_SEPARATOR.'test.gif', $this->file->getPath());
}
public function testGetNameReturnsNameWithExtension()
@ -32,7 +32,7 @@ class FileTest extends \PHPUnit_Framework_TestCase
public function testGetDirectoryReturnsDirectoryName()
{
$this->assertEquals(__DIR__.'/Fixtures', $this->file->getDirectory());
$this->assertEquals(__DIR__.DIRECTORY_SEPARATOR.'Fixtures', $this->file->getDirectory());
}
public function testGetMimeTypeUsesMimeTypeGuessers()
@ -62,7 +62,7 @@ class FileTest extends \PHPUnit_Framework_TestCase
public function testMove()
{
$path = __DIR__.'/Fixtures/test.copy.gif';
$targetPath = __DIR__.'/Fixtures/test.target.gif';
$targetPath = __DIR__.DIRECTORY_SEPARATOR.'Fixtures'.DIRECTORY_SEPARATOR.'test.target.gif';
@unlink($path);
@unlink($targetPath);
copy(__DIR__.'/Fixtures/test.gif', $path);