Skip to content

Commit

Permalink
[Tests] Replace setMethods() by onlyMethods() and addMethods()
Browse files Browse the repository at this point in the history
  • Loading branch information
alexandre-daubois committed Mar 6, 2023
1 parent 39b8a9e commit e21648e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Test/Traits/ValidatorExtensionTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ protected function getValidatorExtension(): ValidatorExtension
}

$this->validator = $this->createMock(ValidatorInterface::class);
$metadata = $this->getMockBuilder(ClassMetadata::class)->setConstructorArgs([''])->setMethods(['addPropertyConstraint'])->getMock();
$metadata = $this->getMockBuilder(ClassMetadata::class)->setConstructorArgs([''])->onlyMethods(['addPropertyConstraint'])->getMock();
$this->validator->expects($this->any())->method('getMetadataFor')->will($this->returnValue($metadata));
$this->validator->expects($this->any())->method('validate')->will($this->returnValue(new ConstraintViolationList()));

Expand Down

0 comments on commit e21648e

Please sign in to comment.