From ab8bd092bb7a087eea23149b0f238cfc9f4d8041 Mon Sep 17 00:00:00 2001 From: Alexandre Petrone Date: Mon, 10 Feb 2025 17:04:21 +0100 Subject: [PATCH] Fix DoctrineFactoryTest for Symfony 7.3 --- tests/Adapter/Doctrine/DoctrineFactoryTest.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/Adapter/Doctrine/DoctrineFactoryTest.php b/tests/Adapter/Doctrine/DoctrineFactoryTest.php index 5bef1c3..7acdead 100644 --- a/tests/Adapter/Doctrine/DoctrineFactoryTest.php +++ b/tests/Adapter/Doctrine/DoctrineFactoryTest.php @@ -15,6 +15,7 @@ use Doctrine\ORM\EntityManager; use Doctrine\Persistence\ManagerRegistry; +use Doctrine\Persistence\ObjectManager; use Mezcalito\UxSearchBundle\Adapter\Doctrine\DoctrineAdapter; use Mezcalito\UxSearchBundle\Adapter\Doctrine\DoctrineFactory; use Mezcalito\UxSearchBundle\Exception\DoctrineAdapterException; @@ -63,7 +64,7 @@ public function testCreateAdapterThrowsLogicExceptionWhenManagerRegistryIsNull() public function testCreateAdapterThrowsDoctrineAdapterExceptionForInvalidManager(): void { - $invalidManager = new \stdClass(); + $invalidManager = $this->createMock(ObjectManager::class); $managerRegistryMock = $this->createMock(ManagerRegistry::class); $managerRegistryMock->expects($this->once()) ->method('getManager')