2019-02-16 08:40:42 +01:00
|
|
|
<?php
|
|
|
|
|
2019-05-30 16:52:02 +02:00
|
|
|
namespace tests\Integration\Domain\Request\Action;
|
2019-02-16 08:40:42 +01:00
|
|
|
|
2019-02-17 14:33:19 +01:00
|
|
|
use Infinito\DBAL\Types\ActionType;
|
2020-04-02 21:13:35 +02:00
|
|
|
use Infinito\Domain\Request\Action\RequestedActionServiceInterface;
|
2019-05-30 16:52:02 +02:00
|
|
|
use Infinito\Domain\Request\Entity\LazyRequestedEntity;
|
2020-04-02 21:13:35 +02:00
|
|
|
use Symfony\Bundle\FrameworkBundle\Test\KernelTestCase;
|
2019-02-16 08:40:42 +01:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @author kevinfrantz
|
|
|
|
*/
|
|
|
|
class RequestedActionServiceIntegrationTest extends KernelTestCase
|
|
|
|
{
|
|
|
|
/**
|
|
|
|
* @var RequestedActionServiceInterface
|
|
|
|
*/
|
|
|
|
private $requestedActionService;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* {@inheritdoc}
|
|
|
|
*
|
|
|
|
* @see \PHPUnit\Framework\TestCase::setUp()
|
|
|
|
*/
|
|
|
|
public function setUp(): void
|
|
|
|
{
|
|
|
|
self::bootKernel();
|
|
|
|
$this->requestedActionService = self::$container->get(RequestedActionServiceInterface::class);
|
|
|
|
}
|
|
|
|
|
|
|
|
public function testActionAccessors(): void
|
|
|
|
{
|
2019-02-18 21:09:57 +01:00
|
|
|
$actionType = ActionType::EXECUTE;
|
2019-02-16 08:40:42 +01:00
|
|
|
$this->assertNull($this->requestedActionService->setActionType($actionType));
|
|
|
|
$this->assertEquals($actionType, $this->requestedActionService->getActionType());
|
|
|
|
}
|
2019-02-18 19:01:50 +01:00
|
|
|
|
|
|
|
public function testLazyRequestedEntity(): void
|
|
|
|
{
|
|
|
|
$this->assertInstanceOf(LazyRequestedEntity::class, $this->requestedActionService->getRequestedEntity());
|
|
|
|
}
|
2019-02-16 08:40:42 +01:00
|
|
|
}
|