@@ -494,29 +494,29 @@ public function testTranslator()
494
494
$ files = array_map ('realpath ' , $ options ['resource_files ' ]['en ' ]);
495
495
$ ref = new \ReflectionClass ('Symfony\Component\Validator\Validation ' );
496
496
$ this ->assertContains (
497
- strtr (\dirname ($ ref ->getFileName ()).'/Resources/translations/validators.en.xlf ' , '/ ' , DIRECTORY_SEPARATOR ),
497
+ strtr (\dirname ($ ref ->getFileName ()).'/Resources/translations/validators.en.xlf ' , '/ ' , \ DIRECTORY_SEPARATOR ),
498
498
$ files ,
499
499
'->registerTranslatorConfiguration() finds Validator translation resources '
500
500
);
501
501
$ ref = new \ReflectionClass ('Symfony\Component\Form\Form ' );
502
502
$ this ->assertContains (
503
- strtr (\dirname ($ ref ->getFileName ()).'/Resources/translations/validators.en.xlf ' , '/ ' , DIRECTORY_SEPARATOR ),
503
+ strtr (\dirname ($ ref ->getFileName ()).'/Resources/translations/validators.en.xlf ' , '/ ' , \ DIRECTORY_SEPARATOR ),
504
504
$ files ,
505
505
'->registerTranslatorConfiguration() finds Form translation resources '
506
506
);
507
507
$ ref = new \ReflectionClass ('Symfony\Component\Security\Core\Security ' );
508
508
$ this ->assertContains (
509
- strtr (\dirname ($ ref ->getFileName ()).'/Resources/translations/security.en.xlf ' , '/ ' , DIRECTORY_SEPARATOR ),
509
+ strtr (\dirname ($ ref ->getFileName ()).'/Resources/translations/security.en.xlf ' , '/ ' , \ DIRECTORY_SEPARATOR ),
510
510
$ files ,
511
511
'->registerTranslatorConfiguration() finds Security translation resources '
512
512
);
513
513
$ this ->assertContains (
514
- strtr (__DIR__ .'/Fixtures/translations/test_paths.en.yml ' , '/ ' , DIRECTORY_SEPARATOR ),
514
+ strtr (__DIR__ .'/Fixtures/translations/test_paths.en.yml ' , '/ ' , \ DIRECTORY_SEPARATOR ),
515
515
$ files ,
516
516
'->registerTranslatorConfiguration() finds translation resources in custom paths '
517
517
);
518
518
$ this ->assertContains (
519
- strtr (__DIR__ .'/translations/test_default.en.xlf ' , '/ ' , DIRECTORY_SEPARATOR ),
519
+ strtr (__DIR__ .'/translations/test_default.en.xlf ' , '/ ' , \ DIRECTORY_SEPARATOR ),
520
520
$ files ,
521
521
'->registerTranslatorConfiguration() finds translation resources in default path '
522
522
);
@@ -565,7 +565,7 @@ public function testValidation()
565
565
$ ref = new \ReflectionClass ('Symfony\Component\Form\Form ' );
566
566
$ xmlMappings = array (
567
567
\dirname ($ ref ->getFileName ()).'/Resources/config/validation.xml ' ,
568
- strtr ($ projectDir .'/config/validator/foo.xml ' , '/ ' , DIRECTORY_SEPARATOR ),
568
+ strtr ($ projectDir .'/config/validator/foo.xml ' , '/ ' , \ DIRECTORY_SEPARATOR ),
569
569
);
570
570
571
571
$ calls = $ container ->getDefinition ('validator.builder ' )->getMethodCalls ();
@@ -659,10 +659,10 @@ public function testValidationPaths()
659
659
$ this ->assertCount (3 , $ xmlMappings );
660
660
try {
661
661
// Testing symfony/symfony
662
- $ this ->assertStringEndsWith ('Component ' .DIRECTORY_SEPARATOR .'Form/Resources/config/validation.xml ' , $ xmlMappings [0 ]);
662
+ $ this ->assertStringEndsWith ('Component ' .\ DIRECTORY_SEPARATOR .'Form/Resources/config/validation.xml ' , $ xmlMappings [0 ]);
663
663
} catch (\Exception $ e ) {
664
664
// Testing symfony/framework-bundle with deps=high
665
- $ this ->assertStringEndsWith ('symfony ' .DIRECTORY_SEPARATOR .'form/Resources/config/validation.xml ' , $ xmlMappings [0 ]);
665
+ $ this ->assertStringEndsWith ('symfony ' .\ DIRECTORY_SEPARATOR .'form/Resources/config/validation.xml ' , $ xmlMappings [0 ]);
666
666
}
667
667
$ this ->assertStringEndsWith ('TestBundle/Resources/config/validation.xml ' , $ xmlMappings [1 ]);
668
668
@@ -686,10 +686,10 @@ public function testValidationPathsUsingCustomBundlePath()
686
686
687
687
try {
688
688
// Testing symfony/symfony
689
- $ this ->assertStringEndsWith ('Component ' .DIRECTORY_SEPARATOR .'Form/Resources/config/validation.xml ' , $ xmlMappings [0 ]);
689
+ $ this ->assertStringEndsWith ('Component ' .\ DIRECTORY_SEPARATOR .'Form/Resources/config/validation.xml ' , $ xmlMappings [0 ]);
690
690
} catch (\Exception $ e ) {
691
691
// Testing symfony/framework-bundle with deps=high
692
- $ this ->assertStringEndsWith ('symfony ' .DIRECTORY_SEPARATOR .'form/Resources/config/validation.xml ' , $ xmlMappings [0 ]);
692
+ $ this ->assertStringEndsWith ('symfony ' .\ DIRECTORY_SEPARATOR .'form/Resources/config/validation.xml ' , $ xmlMappings [0 ]);
693
693
}
694
694
$ this ->assertStringEndsWith ('CustomPathBundle/Resources/config/validation.xml ' , $ xmlMappings [1 ]);
695
695
@@ -899,15 +899,15 @@ public function testSerializerMapping()
899
899
900
900
foreach ($ expectedLoaders as $ definition ) {
901
901
if (is_file ($ arg = $ definition ->getArgument (0 ))) {
902
- $ definition ->replaceArgument (0 , strtr ($ arg , '/ ' , DIRECTORY_SEPARATOR ));
902
+ $ definition ->replaceArgument (0 , strtr ($ arg , '/ ' , \ DIRECTORY_SEPARATOR ));
903
903
}
904
904
$ definition ->setPublic (false );
905
905
}
906
906
907
907
$ loaders = $ container ->getDefinition ('serializer.mapping.chain_loader ' )->getArgument (0 );
908
908
foreach ($ loaders as $ loader ) {
909
909
if (is_file ($ arg = $ loader ->getArgument (0 ))) {
910
- $ loader ->replaceArgument (0 , strtr ($ arg , '/ ' , DIRECTORY_SEPARATOR ));
910
+ $ loader ->replaceArgument (0 , strtr ($ arg , '/ ' , \ DIRECTORY_SEPARATOR ));
911
911
}
912
912
}
913
913
$ this ->assertEquals ($ expectedLoaders , $ loaders );
0 commit comments