We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
setMethods()
onlyMethods()
addMethods()
1 parent 39b8a9e commit e21648eCopy full SHA for e21648e
Test/Traits/ValidatorExtensionTrait.php
@@ -35,7 +35,7 @@ protected function getValidatorExtension(): ValidatorExtension
35
}
36
37
$this->validator = $this->createMock(ValidatorInterface::class);
38
- $metadata = $this->getMockBuilder(ClassMetadata::class)->setConstructorArgs([''])->setMethods(['addPropertyConstraint'])->getMock();
+ $metadata = $this->getMockBuilder(ClassMetadata::class)->setConstructorArgs([''])->onlyMethods(['addPropertyConstraint'])->getMock();
39
$this->validator->expects($this->any())->method('getMetadataFor')->will($this->returnValue($metadata));
40
$this->validator->expects($this->any())->method('validate')->will($this->returnValue(new ConstraintViolationList()));
41
0 commit comments