mirror of
https://github.com/kevinveenbirkenbach/infinito.git
synced 2025-09-13 05:47:11 +02:00
Implemented RequestedEntityServiceIntegrationTest
This commit is contained in:
8
application/symfony/tests/Integration/Domain/README.md
Normal file
8
application/symfony/tests/Integration/Domain/README.md
Normal file
@@ -0,0 +1,8 @@
|
||||
# Domain Unit Tests
|
||||
## Conventions
|
||||
### Service Tests
|
||||
A test for an service:
|
||||
|
||||
- MUST extend KernelTest
|
||||
- MUST test the actual injection
|
||||
- MUST be an integration test
|
@@ -0,0 +1,37 @@
|
||||
<?php
|
||||
|
||||
namespace tests\Integration\Domain\RequestManagement\Entity;
|
||||
|
||||
use Symfony\Bundle\FrameworkBundle\Test\KernelTestCase;
|
||||
use App\Domain\RequestManagement\Entity\RequestedEntityServiceInterface;
|
||||
use App\Domain\RequestManagement\Entity\RequestedEntityService;
|
||||
use App\Entity\Source\AbstractSource;
|
||||
|
||||
/**
|
||||
* @author kevinfrantz
|
||||
*/
|
||||
class RequestedEntityServiceIntegrationTest extends KernelTestCase
|
||||
{
|
||||
/**
|
||||
* @var RequestedEntityServiceInterface
|
||||
*/
|
||||
private $requestedEntityService;
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*
|
||||
* @see \PHPUnit\Framework\TestCase::setUp()
|
||||
*/
|
||||
public function setUp(): void
|
||||
{
|
||||
self::bootKernel();
|
||||
$this->requestedEntityService = self::$container->get(RequestedEntityService::class);
|
||||
}
|
||||
|
||||
public function testClassAccessors(): void
|
||||
{
|
||||
$class = AbstractSource::class;
|
||||
$this->assertNull($this->requestedEntityService->setClass($class));
|
||||
$this->assertEquals($class, $this->requestedEntityService->getClass());
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user