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()); } }