| 1 | <?php |
||
| 18 | use Symfony\Component\DependencyInjection\ContainerBuilder; |
||
| 19 | |||
| 20 | class SonataDoctrineORMAdminExtensionTest extends TestCase |
||
| 21 | { |
||
| 22 | /** |
||
| 23 | * @var ContainerBuilder |
||
| 24 | */ |
||
| 25 | protected $configuration; |
||
| 26 | |||
| 27 | protected function tearDown(): void |
||
| 31 | |||
| 32 | public function testEntityManagerSetFactory(): void |
||
| 33 | { |
||
| 34 | $this->configuration = new ContainerBuilder(); |
||
| 35 | $this->configuration->setParameter('kernel.bundles', ['SimpleThingsEntityAuditBundle' => true]); |
||
| 36 | $loader = new SonataDoctrineORMAdminExtension(); |
||
| 37 | $loader->load([], $this->configuration); |
||
| 38 | |||
| 39 | $definition = $this->configuration->getDefinition('sonata.admin.entity_manager'); |
||
| 40 | |||
| 41 | $this->assertNotNull($definition->getFactory()); |
||
| 42 | $this->assertNotFalse($this->configuration->getParameter('sonata_doctrine_orm_admin.audit.force')); |
||
| 43 | } |
||
| 45 |