mirror of
https://github.com/kevinveenbirkenbach/infinito.git
synced 2025-09-13 05:47:11 +02:00
Optimized Tests and attributes
This commit is contained in:
@@ -11,7 +11,7 @@ use App\DBAL\Types\ActionType;
|
||||
use App\Domain\ActionManagement\ActionInterface;
|
||||
use App\Domain\RequestManagement\Action\RequestedActionInterface;
|
||||
use App\Domain\RequestManagement\Action\RequestedAction;
|
||||
use App\Domain\RequestManagement\Right\RequestedRightInterface;
|
||||
use App\Domain\RequestManagement\Right\RequestedRight;
|
||||
|
||||
/**
|
||||
* @author kevinfrantz
|
||||
@@ -35,14 +35,13 @@ class ActionFactoryServiceTest extends TestCase
|
||||
|
||||
public function setUp(): void
|
||||
{
|
||||
$requestedRight = $this->createMock(RequestedRightInterface::class);
|
||||
$requestedRight = new RequestedRight();
|
||||
$this->requestedAction = new RequestedAction($requestedRight);
|
||||
$this->actionService = $this->createMock(ActionServiceInterface::class);
|
||||
$this->actionService->method('getRequestedAction')->willReturn($this->requestedAction);
|
||||
$this->actionFactoryService = new ActionFactoryService($this->actionService);
|
||||
}
|
||||
|
||||
|
||||
public function testCreate(): void
|
||||
{
|
||||
foreach (ActionType::getChoices() as $action) {
|
||||
|
@@ -10,6 +10,7 @@ use App\Domain\RequestManagement\Action\RequestedAction;
|
||||
use App\DBAL\Types\ActionType;
|
||||
use App\DBAL\Types\Meta\Right\CRUDType;
|
||||
use App\Repository\Source\SourceRepositoryInterface;
|
||||
use App\DBAL\Types\Meta\Right\LayerType;
|
||||
|
||||
/**
|
||||
* @author kevinfrantz
|
||||
@@ -54,4 +55,13 @@ class RequestedActionTest extends TestCase
|
||||
$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());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user