@@ -536,9 +536,13 @@ public function testTemplatingRequiresAtLeastOneEngine()
536
536
public function testValidation ()
537
537
{
538
538
$ container = $ this ->createContainerFromFile ('full ' );
539
+ $ projectDir = $ container ->getParameter ('kernel.project_dir ' );
539
540
540
541
$ 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
+ );
542
546
543
547
$ calls = $ container ->getDefinition ('validator.builder ' )->getMethodCalls ();
544
548
@@ -626,7 +630,7 @@ public function testValidationPaths()
626
630
$ this ->assertEquals (array (new Reference ('validator.mapping.cache.symfony ' )), $ calls [7 ][1 ]);
627
631
628
632
$ xmlMappings = $ calls [3 ][1 ][0 ];
629
- $ this ->assertCount (2 , $ xmlMappings );
633
+ $ this ->assertCount (3 , $ xmlMappings );
630
634
try {
631
635
// Testing symfony/symfony
632
636
$ this ->assertStringEndsWith ('Component ' .DIRECTORY_SEPARATOR .'Form/Resources/config/validation.xml ' , $ xmlMappings [0 ]);
@@ -652,7 +656,7 @@ public function testValidationPathsUsingCustomBundlePath()
652
656
653
657
$ calls = $ container ->getDefinition ('validator.builder ' )->getMethodCalls ();
654
658
$ xmlMappings = $ calls [3 ][1 ][0 ];
655
- $ this ->assertCount (2 , $ xmlMappings );
659
+ $ this ->assertCount (3 , $ xmlMappings );
656
660
657
661
try {
658
662
// Testing symfony/symfony
@@ -694,7 +698,7 @@ public function testValidationMapping()
694
698
$ calls = $ container ->getDefinition ('validator.builder ' )->getMethodCalls ();
695
699
696
700
$ this ->assertSame ('addXmlMappings ' , $ calls [3 ][0 ]);
697
- $ this ->assertCount (2 , $ calls [3 ][1 ][0 ]);
701
+ $ this ->assertCount (3 , $ calls [3 ][1 ][0 ]);
698
702
699
703
$ this ->assertSame ('addYamlMappings ' , $ calls [4 ][0 ]);
700
704
$ this ->assertCount (3 , $ calls [4 ][1 ][0 ]);
0 commit comments