From 5890deade5f01be5f721f74087fab705a8557746 Mon Sep 17 00:00:00 2001 From: Alexandre Daubois Date: Fri, 26 Apr 2024 10:58:17 +0200 Subject: [PATCH] Remove calls to `getMockForAbstractClass()` --- Tests/Constraints/UuidValidatorTest.php | 2 +- Tests/Mapping/Loader/FilesLoaderTest.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Tests/Constraints/UuidValidatorTest.php b/Tests/Constraints/UuidValidatorTest.php index d6d6e8069..2c657a376 100644 --- a/Tests/Constraints/UuidValidatorTest.php +++ b/Tests/Constraints/UuidValidatorTest.php @@ -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); } diff --git a/Tests/Mapping/Loader/FilesLoaderTest.php b/Tests/Mapping/Loader/FilesLoaderTest.php index ea5e947be..0c2e2a953 100644 --- a/Tests/Mapping/Loader/FilesLoaderTest.php +++ b/Tests/Mapping/Loader/FilesLoaderTest.php @@ -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 {}; } }