8000 minor #27338 [Form] fix tests on old phpunit versions (nicolas-grekas) · symfony/symfony@614ffde · GitHub
[go: up one dir, main page]

Skip to content

Commit 614ffde

Browse files
minor #27338 [Form] fix tests on old phpunit versions (nicolas-grekas)
This PR was merged into the 3.4 branch. Discussion ---------- [Form] fix tests on old phpunit versions | Q | A | ------------- | --- | Branch? | 3.4 | Bug fix? | no | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | - | License | MIT | Doc PR | - Should make appveyor green. Commits ------- 208d1d1 [Form] fix tests on old phpunit versions
2 parents 8e20ab5 + 208d1d1 commit 614ffde

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed

src/Symfony/Component/Form/Test/Traits/ValidatorExtensionTrait.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ protected function getValidatorExtension()
3131
}
3232

3333
$this->validator = $this->getMockBuilder(ValidatorInterface::class)->getMock();
34-
$metadata = $this->getMockBuilder(ClassMetadata::class)->disableOriginalConstructor()->getMock();
34+
$metadata = $this->getMockBuilder(ClassMetadata::class)->disableOriginalConstructor()->setMethods(array('addPropertyConstraint'))->getMock();
3535
$this->validator->expects($this->any())->method('getMetadataFor')->will($this->returnValue($metadata));
3636
$this->validator->expects($this->any())->method('validate')->will($this->returnValue(array()));
3737

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ public function test2Dot5ValidationApi()
2222
->disableOriginalConstructor()
2323
->getMock();
2424
$metadata = $this->getMockBuilder('Symfony\Component\Validator\Mapping\ClassMetadata')
25+
->setMethods(array('addConstraint', 'addPropertyConstraint'))
2526
->disableOriginalConstructor()
2627
->getMock();
2728

src/Symfony/Component/Serializer/Mapping/AttributeMetadataInterface.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,5 +60,5 @@ public function getMaxDepth();
6060
/**
6161
* Merges an {@see AttributeMetadataInterface} with in the current one.
6262
*/
63-
public function merge(self $attributeMetadata);
63+
public function merge(AttributeMetadataInterface $attributeMetadata);
6464
}

0 commit comments

Comments
 (0)
0