mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
Fix StoredObjectApiControllerTest.php to match new dependency injection
This commit is contained in:
parent
3c801a6d0e
commit
b597ff89e0
@ -14,6 +14,7 @@ namespace Chill\DocStoreBundle\Tests\Controller;
|
|||||||
use Chill\DocStoreBundle\Controller\StoredObjectApiController;
|
use Chill\DocStoreBundle\Controller\StoredObjectApiController;
|
||||||
use Chill\DocStoreBundle\Entity\StoredObject;
|
use Chill\DocStoreBundle\Entity\StoredObject;
|
||||||
use Doctrine\ORM\EntityManagerInterface;
|
use Doctrine\ORM\EntityManagerInterface;
|
||||||
|
use Doctrine\Persistence\ManagerRegistry;
|
||||||
use PHPUnit\Framework\TestCase;
|
use PHPUnit\Framework\TestCase;
|
||||||
use Symfony\Component\HttpFoundation\JsonResponse;
|
use Symfony\Component\HttpFoundation\JsonResponse;
|
||||||
use Symfony\Component\Security\Core\Security;
|
use Symfony\Component\Security\Core\Security;
|
||||||
@ -45,7 +46,9 @@ class StoredObjectApiControllerTest extends TestCase
|
|||||||
{"type": "stored-object", "id": 1}
|
{"type": "stored-object", "id": 1}
|
||||||
JSON);
|
JSON);
|
||||||
|
|
||||||
$controller = new StoredObjectApiController($security, $serializer, $entityManager);
|
$managerRegistry = $this->createMock(ManagerRegistry::class);
|
||||||
|
|
||||||
|
$controller = new StoredObjectApiController($security, $serializer, $entityManager, $managerRegistry);
|
||||||
|
|
||||||
$actual = $controller->createStoredObject();
|
$actual = $controller->createStoredObject();
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user