requestedAction = $this->createMock(RequestedActionInterface::class); $this->secureRequestedRightChecker = $this->createMock(SecureRequestedRightCheckerInterface::class); $this->entityFormBuilderService = $this->createMock(EntityFormBuilderServiceInterface::class); $this->requestStack = $this->createMock(RequestStack::class); $this->layerRepositoryFactoryService = $this->createMock(LayerRepositoryFactoryServiceInterface::class); $this->entityManager = $this->createMock(EntityManagerInterface::class); $this->actionService = new ActionService($this->requestedAction, $this->secureRequestedRightChecker, $this->requestStack, $this->layerRepositoryFactoryService, $this->entityFormBuilderService, $this->entityManager); } public function testIsRequestedActionSecure() { $this->secureRequestedRightChecker->method('check')->willReturn(true); $this->assertTrue($this->actionService->isRequestedActionSecure()); } public function testRequestedActionGetter() { $this->assertInstanceOf(RequestedActionInterface::class, $this->actionService->getRequestedAction()); } }