Fixed some tests on Windows

This commit is contained in:
Christophe Coevoet 2013-01-18 21:36:32 +01:00
parent d4a0804aab
commit 44fe249bae
2 changed files with 4 additions and 2 deletions

View File

@ -206,7 +206,7 @@ abstract class FrameworkExtensionTest extends TestCase
'->registerTranslatorConfiguration() finds Form translation resources'
);
$this->assertContains(
'Symfony/Component/Security/Resources/translations/security.en.xlf',
str_replace('/', DIRECTORY_SEPARATOR, 'Symfony/Component/Security/Resources/translations/security.en.xlf'),
$files,
'->registerTranslatorConfiguration() finds Security translation resources'
);

View File

@ -17,7 +17,9 @@ abstract class IteratorTestCase extends \PHPUnit_Framework_TestCase
{
// set iterator_to_array $use_key to false to avoid values merge
// this made FinderTest::testAppendWithAnArray() failed with GnuFinderAdapter
$values = array_map(function (\SplFileInfo $fileinfo) { return $fileinfo->getPathname(); }, iterator_to_array($iterator, false));
$values = array_map(function (\SplFileInfo $fileinfo) { return str_replace('/', DIRECTORY_SEPARATOR, $fileinfo->getPathname()); }, iterator_to_array($iterator, false));
$expected = array_map(function ($path) { return str_replace('/', DIRECTORY_SEPARATOR, $path); }, $expected);
sort($values);
sort($expected);