From b597ff89e06d389aaf4e0b30dfe33434d5ca199c Mon Sep 17 00:00:00 2001 From: Julie Lenaerts Date: Wed, 26 Feb 2025 11:11:57 +0100 Subject: [PATCH] Fix StoredObjectApiControllerTest.php to match new dependency injection --- .../Tests/Controller/StoredObjectApiControllerTest.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Bundle/ChillDocStoreBundle/Tests/Controller/StoredObjectApiControllerTest.php b/src/Bundle/ChillDocStoreBundle/Tests/Controller/StoredObjectApiControllerTest.php index 74dbd9b46..3f87067e0 100644 --- a/src/Bundle/ChillDocStoreBundle/Tests/Controller/StoredObjectApiControllerTest.php +++ b/src/Bundle/ChillDocStoreBundle/Tests/Controller/StoredObjectApiControllerTest.php @@ -14,6 +14,7 @@ namespace Chill\DocStoreBundle\Tests\Controller; use Chill\DocStoreBundle\Controller\StoredObjectApiController; use Chill\DocStoreBundle\Entity\StoredObject; use Doctrine\ORM\EntityManagerInterface; +use Doctrine\Persistence\ManagerRegistry; use PHPUnit\Framework\TestCase; use Symfony\Component\HttpFoundation\JsonResponse; use Symfony\Component\Security\Core\Security; @@ -45,7 +46,9 @@ class StoredObjectApiControllerTest extends TestCase {"type": "stored-object", "id": 1} JSON); - $controller = new StoredObjectApiController($security, $serializer, $entityManager); + $managerRegistry = $this->createMock(ManagerRegistry::class); + + $controller = new StoredObjectApiController($security, $serializer, $entityManager, $managerRegistry); $actual = $controller->createStoredObject();