@@ -536,9 +536,13 @@ public function testTemplatingRequiresAtLeastOneEngine()
536536 public function testValidation ()
537537 {
538538 $ container = $ this ->createContainerFromFile ('full ' );
539+ $ projectDir = $ container ->getParameter ('kernel.project_dir ' );
539540
540541 $ ref = new \ReflectionClass ('Symfony\Component\Form\Form ' );
541- $ xmlMappings = array (dirname ($ ref ->getFileName ()).'/Resources/config/validation.xml ' );
542+ $ xmlMappings = array (
543+ dirname ($ ref ->getFileName ()).'/Resources/config/validation.xml ' ,
544+ str_replace ('/ ' , DIRECTORY_SEPARATOR , $ projectDir .'/config/validator/foo.xml ' ),
545+ );
542546
543547 $ calls = $ container ->getDefinition ('validator.builder ' )->getMethodCalls ();
544548
@@ -626,7 +630,7 @@ public function testValidationPaths()
626630 $ this ->assertEquals (array (new Reference ('validator.mapping.cache.symfony ' )), $ calls [7 ][1 ]);
627631
628632 $ xmlMappings = $ calls [3 ][1 ][0 ];
629- $ this ->assertCount (2 , $ xmlMappings );
633+ $ this ->assertCount (3 , $ xmlMappings );
630634 try {
631635 // Testing symfony/symfony
632636 $ this ->assertStringEndsWith ('Component ' .DIRECTORY_SEPARATOR .'Form/Resources/config/validation.xml ' , $ xmlMappings [0 ]);
@@ -652,7 +656,7 @@ public function testValidationPathsUsingCustomBundlePath()
652656
653657 $ calls = $ container ->getDefinition ('validator.builder ' )->getMethodCalls ();
654658 $ xmlMappings = $ calls [3 ][1 ][0 ];
655- $ this ->assertCount (2 , $ xmlMappings );
659+ $ this ->assertCount (3 , $ xmlMappings );
656660
657661 try {
658662 // Testing symfony/symfony
@@ -694,7 +698,7 @@ public function testValidationMapping()
694698 $ calls = $ container ->getDefinition ('validator.builder ' )->getMethodCalls ();
695699
696700 $ this ->assertSame ('addXmlMappings ' , $ calls [3 ][0 ]);
697- $ this ->assertCount (2 , $ calls [3 ][1 ][0 ]);
701+ $ this ->assertCount (3 , $ calls [3 ][1 ][0 ]);
698702
699703 $ this ->assertSame ('addYamlMappings ' , $ calls [4 ][0 ]);
700704 $ this ->assertCount (3 , $ calls [4 ][1 ][0 ]);
0 commit comments