8000 minor #14901 [Form] add test to avoid regression of #14891 (xabbuh) · symfony/symfony@97050dc · GitHub
[go: up one dir, main page]

Skip to content

Commit 97050dc

Browse files
committed
minor #14901 [Form] add test to avoid regression of #14891 (xabbuh)
This PR was merged into the 2.6 branch. Discussion ---------- [Form] add test to avoid regression of #14891 | Q | A | ------------- | --- | Bug fix? | no | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | #14891 | License | MIT | Doc PR | Commits ------- 12a19c8 [Form] add test to avoid regression of #14891
2 parents 847a3e3 + 12a19c8 commit 97050dc

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/Symfony/Component/Form/Tests/Extension/Validator/ValidatorExtensionTest.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,9 @@ class ValidatorExtensionTest extends \PHPUnit_Framework_TestCase
1717
{
1818
public function test2Dot5ValidationApi()
1919
{
20-
$validator = $this->getMock('Symfony\Component\Validator\Validator\ValidatorInterface');
20+
$validator = $this->getMockBuilder('Symfony\Component\Validator\Validator\RecursiveValidator')
21+
->disableOriginalConstructor()
22+
->getMock();
2123
$metadata = $this->getMockBuilder('Symfony\Component\Validator\Mapping\ClassMetadata')
2224
->disableOriginalConstructor()
2325
->getMock();
@@ -36,6 +38,10 @@ public function test2Dot5ValidationApi()
3638
->method('addPropertyConstraint')
3739
->with('children', $this->isInstanceOf('Symfony\Component\Validator\Constraints\Valid'));
3840

41+
$validator
42+
->expects($this->never())
43+
->method('getMetadataFactory');
44+
3945
$extension = new ValidatorExtension($validator);
4046
$guesser = $extension->loadTypeGuesser();
4147

0 commit comments

Comments
 (0)
0