8000 [Form] fix tests on old phpunit versions · symfony/symfony@208d1d1 · GitHub
[go: up one dir, main page]

Skip to content

Commit 208d1d1

Browse files
[Form] fix tests on old phpunit versions
1 parent 52270d1 commit 208d1d1

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