mirror of
				https://github.com/kevinveenbirkenbach/infinito.git
				synced 2025-11-04 03:07:58 +00:00 
			
		
		
		
	Implemented ActionHandlerServiceIntegrationTest
This commit is contained in:
		@@ -0,0 +1,47 @@
 | 
			
		||||
<?php
 | 
			
		||||
 | 
			
		||||
namespace tests\Integration\Domain\ActionManagement;
 | 
			
		||||
 | 
			
		||||
use Symfony\Bundle\FrameworkBundle\Test\KernelTestCase;
 | 
			
		||||
use App\Domain\ActionManagement\ActionHandlerServiceInterface;
 | 
			
		||||
use App\Domain\RequestManagement\Action\RequestedActionServiceInterface;
 | 
			
		||||
use App\Domain\FixtureManagement\FixtureSource\ImpressumFixtureSource;
 | 
			
		||||
use App\Entity\Source\SourceInterface;
 | 
			
		||||
use App\DBAL\Types\ActionType;
 | 
			
		||||
use App\DBAL\Types\Meta\Right\LayerType;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * @author kevinfrantz
 | 
			
		||||
 */
 | 
			
		||||
class ActionHandlerServiceIntegrationTest extends KernelTestCase
 | 
			
		||||
{
 | 
			
		||||
    /**
 | 
			
		||||
     * @var ActionHandlerServiceInterface
 | 
			
		||||
     */
 | 
			
		||||
    private $actionHandlerService;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * @var RequestedActionServiceInterface
 | 
			
		||||
     */
 | 
			
		||||
    private $requestedActionService;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * {@inheritdoc}
 | 
			
		||||
     *
 | 
			
		||||
     * @see \PHPUnit\Framework\TestCase::setUp()
 | 
			
		||||
     */
 | 
			
		||||
    public function setUp(): void
 | 
			
		||||
    {
 | 
			
		||||
        self::bootKernel();
 | 
			
		||||
        $this->actionHandlerService = self::$container->get(ActionHandlerServiceInterface::class);
 | 
			
		||||
        $this->requestedActionService = self::$container->get(RequestedActionServiceInterface::class);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public function testEnityManager(): void
 | 
			
		||||
    {
 | 
			
		||||
        $this->requestedActionService->getRequestedEntity()->setSlug(ImpressumFixtureSource::SLUG);
 | 
			
		||||
        $this->requestedActionService->setActionType(ActionType::READ);
 | 
			
		||||
        $this->requestedActionService->setLayer(LayerType::SOURCE);
 | 
			
		||||
        $this->assertInstanceOf(SourceInterface::class, $this->actionHandlerService->handle());
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
		Reference in New Issue
	
	Block a user