@@ -543,9 +543,13 @@ public function testTemplatingRequiresAtLeastOneEngine()
543
543
public function testValidation ()
544
544
{
545
545
$ container = $ this ->createContainerFromFile ('full ' );
546
+ $ projectDir = $ container ->getParameter ('kernel.project_dir ' );
546
547
547
548
$ ref = new \ReflectionClass ('Symfony\Component\Form\Form ' );
548
- $ xmlMappings = array (dirname ($ ref ->getFileName ()).'/Resources/config/validation.xml ' );
549
+ $ xmlMappings = array (
550
+ dirname ($ ref ->getFileName ()).'/Resources/config/validation.xml ' ,
551
+ strtr ($ projectDir .'/config/validator/foo.xml ' , '/ ' , DIRECTORY_SEPARATOR ),
552
+ );
549
553
550
554
$ calls = $ container ->getDefinition ('validator.builder ' )->getMethodCalls ();
551
555
@@ -633,7 +637,7 @@ public function testValidationPaths()
633
637
$ this ->assertEquals (array (new Reference ('validator.mapping.cache.symfony ' )), $ calls [7 ][1 ]);
634
638
635
639
$ xmlMappings = $ calls [3 ][1 ][0 ];
636
- $ this ->assertCount (2 , $ xmlMappings );
640
+ $ this ->assertCount (3 , $ xmlMappings );
637
641
try {
638
642
// Testing symfony/symfony
639
6
D0E7
43
$ this ->assertStringEndsWith ('Component ' .DIRECTORY_SEPARATOR .'Form/Resources/config/validation.xml ' , $ xmlMappings [0 ]);
@@ -659,7 +663,7 @@ public function testValidationPathsUsingCustomBundlePath()
659
663
660
664
$ calls = $ container ->getDefinition ('validator.builder ' )->getMethodCalls ();
661
665
$ xmlMappings = $ calls [3 ][1 ][0 ];
662
- $ this ->assertCount (2 , $ xmlMappings );
666
+ $ this ->assertCount (3 , $ xmlMappings );
663
667
664
668
try {
665
669
// Testing symfony/symfony
@@ -701,7 +705,7 @@ public function testValidationMapping()
701
705
$ calls = $ container ->getDefinition ('validator.builder ' )->getMethodCalls ();
702
706
703
707
$ this ->assertSame ('addXmlMappings ' , $ calls [3 ][0 ]);
704
- $ this ->assertCount (2 , $ calls [3 ][1 ][0 ]);
708
+ $ this ->assertCount (3 , $ calls [3 ][1 ][0 ]);
705
709
706
710
$ this ->assertSame ('addYamlMappings ' , $ calls [4 ][0 ]);
707
711
$ this ->assertCount (3 , $ calls [4 ][1 ][0 ]);
0 commit comments