diff --git a/tests/DependencyInjection/DoctrineExtensionTest.php b/tests/DependencyInjection/DoctrineExtensionTest.php index 8b5cea19..c3d25d8c 100644 --- a/tests/DependencyInjection/DoctrineExtensionTest.php +++ b/tests/DependencyInjection/DoctrineExtensionTest.php @@ -50,7 +50,6 @@ use Symfony\Component\DependencyInjection\Reference; use Symfony\Component\Messenger\Bridge\Doctrine\Transport\DoctrineTransportFactory; use Symfony\Component\Messenger\MessageBusInterface; -use Symfony\Component\Validator\Mapping\Loader\AnnotationLoader; use function array_values; use function class_exists; @@ -823,39 +822,6 @@ public function testXmlBundleMappingDetection(): void ]); } - public function testAnnotationsBundleMappingDetection(): void - { - if (! interface_exists(EntityManagerInterface::class)) { - self::markTestSkipped('This test requires ORM'); - } - - $container = $this->getContainer(['AnnotationsBundle']); - $extension = new DoctrineExtension(); - - $config = BundleConfigurationBuilder::createBuilder() - ->addBaseConnection() - ->addEntityManager([ - 'default_entity_manager' => 'default', - 'entity_managers' => [ - 'default' => [ - 'mappings' => [ - 'AnnotationsBundle' => [], - ], - ], - ], - ]) - ->build(); - $extension->load([$config], $container); - - $definition = $container->getDefinition('doctrine.orm.default_metadata_driver'); - $this->assertDICDefinitionMethodCallOnce($definition, 'addDriver', [ - new Reference(class_exists(AnnotationLoader::class) - ? 'doctrine.orm.default_annotation_metadata_driver' - : 'doctrine.orm.default_attribute_metadata_driver'), - 'Fixtures\Bundles\AnnotationsBundle\Entity', - ]); - } - /** @requires PHP 8 */ public function testAttributesBundleMappingDetection(): void {