Skip to content

Commit

Permalink
Remove calls to getMockForAbstractClass()
Browse files Browse the repository at this point in the history
  • Loading branch information
alexandre-daubois committed May 15, 2024
1 parent 146b59f commit 5890dea
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Tests/Constraints/UuidValidatorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public function testEmptyStringIsValid()
public function testExpectsUuidConstraintCompatibleType()
{
$this->expectException(UnexpectedTypeException::class);
$constraint = $this->getMockForAbstractClass(Constraint::class);
$constraint = $this->createStub(Constraint::class);

$this->validator->validate('216fff40-98d9-11e3-a5e2-0800200c9a66', $constraint);
}
Expand Down
4 changes: 2 additions & 2 deletions Tests/Mapping/Loader/FilesLoaderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,11 @@ public function testCallsActualFileLoaderForMetadata()

public function getFilesLoader(LoaderInterface $loader)
{
return $this->getMockForAbstractClass(FilesLoader::class, [[
return new class([
__DIR__.'/constraint-mapping.xml',
__DIR__.'/constraint-mapping.yaml',
__DIR__.'/constraint-mapping.test',
__DIR__.'/constraint-mapping.txt',
], $loader]);
], $loader) extends FilesLoader {};
}
}

0 comments on commit 5890dea

Please # to comment.