@@ -501,29 +501,29 @@ public function testTranslator()
501
501
$ files = array_map ('realpath ' , $ options ['resource_files ' ]['en ' ]);
502
502
$ ref = new \ReflectionClass ('Symfony\Component\Validator\Validation ' );
503
503
$ 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 ),
505
505
$ files ,
506
506
'->registerTranslatorConfiguration() finds Validator translation resources '
507
507
);
508
508
$ ref = new \ReflectionClass ('Symfony\Component\Form\Form ' );
509
509
$ 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 ),
511
511
$ files ,
512
512
'->registerTranslatorConfiguration() finds Form translation resources '
513
513
);
514
514
$ ref = new \ReflectionClass ('Symfony\Component\Security\Core\Security ' );
515
515
$ 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 ),
517
517
$ files ,
518
518
'->registerTranslatorConfiguration() finds Security translation resources '
519
519
);
520
520
$ this ->assertContains (
521
- strtr (__DIR__ .'/Fixtures/translations/test_paths.en.yml ' , '/ ' , DIRECTORY_SEPARATOR ),
521
+ strtr (__DIR__ .'/Fixtures/translations/test_paths.en.yml ' , '/ ' , \ DIRECTORY_SEPARATOR ),
522
522
$ files ,
523
523
'->registerTranslatorConfiguration() finds translation resources in custom paths '
524
524
);
525
525
$ this ->assertContains (
526
- strtr (__DIR__ .'/translations/test_default.en.xlf ' , '/ ' , DIRECTORY_SEPARATOR ),
526
+ strtr (__DIR__ .'/translations/test_default.en.xlf ' , '/ ' , \ DIRECTORY_SEPARATOR ),
527
527
$ files ,
528
528
'->registerTranslatorConfiguration() finds translation resources in default path '
529
529
);
@@ -572,7 +572,7 @@ public function testValidation()
572
572
$ ref = new \ReflectionClass ('Symfony\Component\Form\Form ' );
573
573
$ xmlMappings = array (
574
574
\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 ),
576
576
);
577
577
578
578
$ calls = $ container ->getDefinition ('validator.builder ' )->getMethodCalls ();
@@ -666,10 +666,10 @@ public function testValidationPaths()
666
666
$ this ->assertCount (3 , $ xmlMappings );
667
667
try {
668
668
// 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 ]);
670
670
} catch (\Exception $ e ) {
671
671
// 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 ]);
673
673
}
674
674
$ this ->assertStringEndsWith ('TestBundle/Resources/config/validation.xml ' , $ xmlMappings [1 ]);
675
675
@@ -693,10 +693,10 @@ public function testValidationPathsUsingCustomBundlePath()
693
693
694
694
try {
695
695
// 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 ]);
697
697
} catch (\Exception $ e ) {
698
698
// 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 ]);
700
700
}
701
701
$ this ->assertStringEndsWith ('CustomPathBundle/Resources/config/validation.xml ' , $ xmlMappings [1 ]);
702
702
@@ -921,15 +921,15 @@ public function testSerializerMapping()
921
921
922
922
foreach ($ expectedLoaders as $ definition ) {
923
923
if (is_file ($ arg = $ definition ->getArgument (0 ))) {
924
- $ definition ->replaceArgument (0 , strtr ($ arg , '/ ' , DIRECTORY_SEPARATOR ));
924
+ $ definition ->replaceArgument (0 , strtr ($ arg , '/ ' , \ DIRECTORY_SEPARATOR ));
925
925
}
926
926
$ definition ->setPublic (false );
927
927
}
928
928
929
929
$ loaders = $ container ->getDefinition ('serializer.mapping.chain_loader ' )->getArgument (0 );
930
930
foreach ($ loaders as $ loader ) {
931
931
if (is_file ($ arg = $ loader ->getArgument (0 ))) {
932
- $ loader ->replaceArgument (0 , strtr ($ arg , '/ ' , DIRECTORY_SEPARATOR ));
932
+ $ loader ->replaceArgument (0 , strtr ($ arg , '/ ' , \ DIRECTORY_SEPARATOR ));
933
933
}
934
934
}
935
935
$ this ->assertEquals ($ expectedLoaders , $ loaders );
0 commit comments