@@ -501,29 +501,29 @@ public function testTranslator()
501501 $ files = array_map ('realpath ' , $ options ['resource_files ' ]['en ' ]);
502502 $ ref = new \ReflectionClass ('Symfony\Component\Validator\Validation ' );
503503 $ this ->assertContains (
504- strtr (\dirname ($ ref ->getFileName ()).'/Resources/translations/validators.en.xlf ' , '/ ' , DIRECTORY_SEPARATOR ),
504+ strtr (\dirname ($ ref ->getFileName ()).'/Resources/translations/validators.en.xlf ' , '/ ' , \ DIRECTORY_SEPARATOR ),
505505 $ files ,
506506 '->registerTranslatorConfiguration() finds Validator translation resources '
507507 );
508508 $ ref = new \ReflectionClass ('Symfony\Component\Form\Form ' );
509509 $ this ->assertContains (
510- strtr (\dirname ($ ref ->getFileName ()).'/Resources/translations/validators.en.xlf ' , '/ ' , DIRECTORY_SEPARATOR ),
510+ strtr (\dirname ($ ref ->getFileName ()).'/Resources/translations/validators.en.xlf ' , '/ ' , \ DIRECTORY_SEPARATOR ),
511511 $ files ,
512512 '->registerTranslatorConfiguration() finds Form translation resources '
513513 );
514514 $ ref = new \ReflectionClass ('Symfony\Component\Security\Core\Security ' );
515515 $ this ->assertContains (
516- strtr (\dirname ($ ref ->getFileName ()).'/Resources/translations/security.en.xlf ' , '/ ' , DIRECTORY_SEPARATOR ),
516+ strtr (\dirname ($ ref ->getFileName ()).'/Resources/translations/security.en.xlf ' , '/ ' , \ DIRECTORY_SEPARATOR ),
517517 $ files ,
518518 '->registerTranslatorConfiguration() finds Security translation resources '
519519 );
520520 $ this ->assertContains (
521- strtr (__DIR__ .'/Fixtures/translations/test_paths.en.yml ' , '/ ' , DIRECTORY_SEPARATOR ),
521+ strtr (__DIR__ .'/Fixtures/translations/test_paths.en.yml ' , '/ ' , \ DIRECTORY_SEPARATOR ),
522522 $ files ,
523523 '->registerTranslatorConfiguration() finds translation resources in custom paths '
524524 );
525525 $ this ->assertContains (
526- strtr (__DIR__ .'/translations/test_default.en.xlf ' , '/ ' , DIRECTORY_SEPARATOR ),
526+ strtr (__DIR__ .'/translations/test_default.en.xlf ' , '/ ' , \ DIRECTORY_SEPARATOR ),
527527 $ files ,
528528 '->registerTranslatorConfiguration() finds translation resources in default path '
529529 );
@@ -572,7 +572,7 @@ public function testValidation()
572572 $ ref = new \ReflectionClass ('Symfony\Component\Form\Form ' );
573573 $ xmlMappings = array (
574574 \dirname ($ ref ->getFileName ()).'/Resources/config/validation.xml ' ,
575- strtr ($ projectDir .'/config/validator/foo.xml ' , '/ ' , DIRECTORY_SEPARATOR ),
575+ strtr ($ projectDir .'/config/validator/foo.xml ' , '/ ' , \ DIRECTORY_SEPARATOR ),
576576 );
577577
578578 $ calls = $ container ->getDefinition ('validator.builder ' )->getMethodCalls ();
@@ -666,10 +666,10 @@ public function testValidationPaths()
666666 $ this ->assertCount (3 , $ xmlMappings );
667667 try {
668668 // Testing symfony/symfony
669- $ this ->assertStringEndsWith ('Component ' .DIRECTORY_SEPARATOR .'Form/Resources/config/validation.xml ' , $ xmlMappings [0 ]);
669+ $ this ->assertStringEndsWith ('Component ' .\ DIRECTORY_SEPARATOR .'Form/Resources/config/validation.xml ' , $ xmlMappings [0 ]);
670670 } catch (\Exception $ e ) {
671671 // Testing symfony/framework-bundle with deps=high
672- $ this ->assertStringEndsWith ('symfony ' .DIRECTORY_SEPARATOR .'form/Resources/config/validation.xml ' , $ xmlMappings [0 ]);
672+ $ this ->assertStringEndsWith ('symfony ' .\ DIRECTORY_SEPARATOR .'form/Resources/config/validation.xml ' , $ xmlMappings [0 ]);
673673 }
674674 $ this ->assertStringEndsWith ('TestBundle/Resources/config/validation.xml ' , $ xmlMappings [1 ]);
675675
@@ -693,10 +693,10 @@ public function testValidationPathsUsingCustomBundlePath()
693693
694694 try {
695695 // Testing symfony/symfony
696- $ this ->assertStringEndsWith ('Component ' .DIRECTORY_SEPARATOR .'Form/Resources/config/validation.xml ' , $ xmlMappings [0 ]);
696+ $ this ->assertStringEndsWith ('Component ' .\ DIRECTORY_SEPARATOR .'Form/Resources/config/validation.xml ' , $ xmlMappings [0 ]);
697697 } catch (\Exception $ e ) {
698698 // Testing symfony/framework-bundle with deps=high
699- $ this ->assertStringEndsWith ('symfony ' .DIRECTORY_SEPARATOR .'form/Resources/config/validation.xml ' , $ xmlMappings [0 ]);
699+ $ this ->assertStringEndsWith ('symfony ' .\ DIRECTORY_SEPARATOR .'form/Resources/config/validation.xml ' , $ xmlMappings [0 ]);
700700 }
701701 $ this ->assertStringEndsWith ('CustomPathBundle/Resources/config/validation.xml ' , $ xmlMappings [1 ]);
702702
@@ -921,15 +921,15 @@ public function testSerializerMapping()
921921
922922 foreach ($ expectedLoaders as $ definition ) {
923923 if (is_file ($ arg = $ definition ->getArgument (0 ))) {
924- $ definition ->replaceArgument (0 , strtr ($ arg , '/ ' , DIRECTORY_SEPARATOR ));
924+ $ definition ->replaceArgument (0 , strtr ($ arg , '/ ' , \ DIRECTORY_SEPARATOR ));
925925 }
926926 $ definition ->setPublic (false );
927927 }
928928
929929 $ loaders = $ container ->getDefinition ('serializer.mapping.chain_loader ' )->getArgument (0 );
930930 foreach ($ loaders as $ loader ) {
931931 if (is_file ($ arg = $ loader ->getArgument (0 ))) {
932- $ loader ->replaceArgument (0 , strtr ($ arg , '/ ' , DIRECTORY_SEPARATOR ));
932+ $ loader ->replaceArgument (0 , strtr ($ arg , '/ ' , \ DIRECTORY_SEPARATOR ));
933933 }
934934 }
935935 $ this ->assertEquals ($ expectedLoaders , $ loaders );
0 commit comments