[Component][HttpKernel] fixed testGetRootDir() on Win

This commit is contained in:
Włodzimierz Gajda 2012-07-06 08:26:06 +02:00
parent 73d3efb7a9
commit 6de6806123

View File

@ -292,7 +292,15 @@ EOF;
{
$kernel = new KernelForTest('test', true);
$this->assertEquals(__DIR__.DIRECTORY_SEPARATOR.'Fixtures', $kernel->getRootDir());
$rootDir = __DIR__.DIRECTORY_SEPARATOR.'Fixtures';
// getRootDir() returns path with slashes
// without conversion test fails on Windows
if (defined('PHP_WINDOWS_VERSION_MAJOR')) {
$rootDir = strtr($rootDir, '\\', '/');
}
$this->assertEquals($rootDir, $kernel->getRootDir());
}
public function testGetName()