Optimized Tests and attributes

This commit is contained in:
Kevin Frantz
2019-01-27 18:38:21 +01:00
parent 0593a8f1c3
commit 17a6ee1dc6
7 changed files with 45 additions and 6 deletions

View File

@@ -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) {