@@ -543,9 +543,13 @@ public function testTemplatingRequiresAtLeastOneEngine()
543543 public function testValidation ()
544544 {
545545 $ container = $ this ->createContainerFromFile ('full ' );
546+ $ projectDir = $ container ->getParameter ('kernel.project_dir ' );
546547
547548 $ 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+ );
549553
550554 $ calls = $ container ->getDefinition ('validator.builder ' )->getMethodCalls ();
551555
@@ -633,7 +637,7 @@ public function testValidationPaths()
633637 $ this ->assertEquals (array (new Reference ('validator.mapping.cache.symfony ' )), $ calls [7 ][1 ]);
634638
635639 $ xmlMappings = $ calls [3 ][1 ][0 ];
636- $ this ->assertCount (2 , $ xmlMappings );
640+ $ this ->assertCount (3 , $ xmlMappings );
637641 try {
638642 // Testing symfony/symfony
639643 $ this ->assertStringEndsWith ('Component ' .DIRECTORY_SEPARATOR .'Form/Resources/config/validation.xml ' , $ xmlMappings [0 ]);
@@ -659,7 +663,7 @@ public function testValidationPathsUsingCustomBundlePath()
659663
660664 $ calls = $ container ->getDefinition ('validator.builder ' )->getMethodCalls ();
661665 $ xmlMappings = $ calls [3 ][1 ][0 ];
662- $ this ->assertCount (2 , $ xmlMappings );
666+ $ this ->assertCount (3 , $ xmlMappings );
663667
664668 try {
665669 // Testing symfony/symfony
@@ -701,7 +705,7 @@ public function testValidationMapping()
701705 $ calls = $ container ->getDefinition ('validator.builder ' )->getMethodCalls ();
702706
703707 $ this ->assertSame ('addXmlMappings ' , $ calls [3 ][0 ]);
704- $ this ->assertCount (2 , $ calls [3 ][1 ][0 ]);
708+ $ this ->assertCount (3 , $ calls [3 ][1 ][0 ]);
705709
706710 $ this ->assertSame ('addYamlMappings ' , $ calls [4 ][0 ]);
707711 $ this ->assertCount (3 , $ calls [4 ][1 ][0 ]);
0 commit comments