From 85a53c1ec9d4c3d1364ece0dffda92ba6c649da1 Mon Sep 17 00:00:00 2001 From: Christophe L Date: Sun, 26 Aug 2012 00:54:18 +0400 Subject: [PATCH] [FrameworkBundle] fixed *FrameworkExtensionTest::testTranslator fail on Windows on master branch --- .../Tests/DependencyInjection/FrameworkExtensionTest.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/FrameworkExtensionTest.php b/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/FrameworkExtensionTest.php index 385ece0c8c..5e9ebc2540 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/FrameworkExtensionTest.php +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/FrameworkExtensionTest.php @@ -182,14 +182,15 @@ abstract class FrameworkExtensionTest extends TestCase } } - $files = array_map(function($resource) use ($resources) { return str_replace(realpath(__DIR__.'/../../../../..').'/', '', realpath($resource[1])); }, $resources); + $rootDirectory = str_replace('/', DIRECTORY_SEPARATOR, realpath(__DIR__.'/../../../../..').'/'); + $files = array_map(function($resource) use ($rootDirectory, $resources) { return str_replace($rootDirectory, '', realpath($resource[1])); }, $resources); $this->assertContains( - 'Symfony/Component/Validator/Resources/translations/validators.en.xlf', + str_replace('/', DIRECTORY_SEPARATOR, 'Symfony/Component/Validator/Resources/translations/validators.en.xlf'), $files, '->registerTranslatorConfiguration() finds Validator translation resources' ); $this->assertContains( - 'Symfony/Component/Form/Resources/translations/validators.en.xlf', + str_replace('/', DIRECTORY_SEPARATOR, 'Symfony/Component/Form/Resources/translations/validators.en.xlf'), $files, '->registerTranslatorConfiguration() finds Form translation resources' );