mirror of
https://github.com/kevinveenbirkenbach/infinito.git
synced 2025-09-13 21:57:16 +02:00
Optimized fixtures
This commit is contained in:
33
application/tests/Integration/FixturesIntegrationTest.php
Normal file
33
application/tests/Integration/FixturesIntegrationTest.php
Normal file
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\Integration;
|
||||
|
||||
use Symfony\Bundle\FrameworkBundle\Test\KernelTestCase;
|
||||
use Doctrine\ORM\EntityManager;
|
||||
use App\Entity\Source\AbstractSource;
|
||||
use App\DBAL\Types\SystemSlugType;
|
||||
use App\Entity\Source\Primitive\Text\TextSourceInterface;
|
||||
|
||||
class FixturesIntegrationTest extends KernelTestCase
|
||||
{
|
||||
/**
|
||||
* @var EntityManager
|
||||
*/
|
||||
protected $entityManager;
|
||||
|
||||
public function setUp(): void
|
||||
{
|
||||
self::bootKernel();
|
||||
$this->entityManager = static::$kernel->getContainer()->get('doctrine')->getManager();
|
||||
}
|
||||
|
||||
public function testImpressum(): void
|
||||
{
|
||||
$sourceRepository = $this->entityManager->getRepository(AbstractSource::class);
|
||||
/**
|
||||
* @var TextSourceInterface
|
||||
*/
|
||||
$imprint = $sourceRepository->findOneBy(['slug' => SystemSlugType::IMPRINT]);
|
||||
$this->assertInternalType('string', $imprint->getText());
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user