createMock(SourceRepositoryInterface::class); $this->requestedRight = new RequestedRight($sourceRepository); $this->action = new RequestedAction($this->requestedRight); } public function testList(): void { $list = ActionType::THREAD; $this->action->setActionType($list); $this->assertEquals($list, $this->action->getActionType()); $this->assertEquals(CRUDType::READ, $this->requestedRight->getCrud()); } public function testCrud(): void { foreach (CRUDType::getChoices() as $crud) { $this->action->setActionType($crud); $this->assertEquals($crud, $this->action->getActionType()); $this->assertEquals($crud, $this->requestedRight->getCrud()); } } public function testLayer(): void { foreach (LayerType::getChoices() as $LayerType) { $this->action->setLayer($LayerType); $this->assertEquals($LayerType, $this->action->getLayer()); $this->assertEquals($LayerType, $this->requestedRight->getLayer()); } } }