getContainer() ->get('doctrine') ->getManager(); $security = $this->createMock(Security::class); $userSourceDirectorService = new UserSourceDirectorService($entityManager, $security); $requestedRightService = new RequestedRightService(); $requestedUserService = new RequestedUserService($userSourceDirectorService, $requestedRightService); $this->requestedActionService = new RequestedActionService($userSourceDirectorService, $requestedUserService); $this->requestedActionService->setActionType(ActionType::CREATE); $entityFormBuilderService = $this->createMock(RequestedActionFormBuilderServiceInterface::class); $requestStack = $this->createMock(RequestStack::class); $layerRepositoryFactoryService = $this->createMock(LayerRepositoryFactoryServiceInterface::class); $secureRequestedRightChecker = $this->createMock(SecureRequestedRightCheckerInterface::class); $this->actionService = new ActionService($this->requestedActionService, $secureRequestedRightChecker, $requestStack, $layerRepositoryFactoryService, $entityFormBuilderService, $entityManager); $this->createSourceAction = new CreateSourceAction($this->actionService); } public function testCreateWithGuestUser(): void { $this->assertInstanceOf(PureSourceInterface::class, $this->createSourceAction->execute()); } // public function testCreatedWithKnownUser(): void // {} }