diff --git a/tests/cases/DI/Configuration/EntityListenerResolverTest.php b/tests/cases/DI/Configuration/EntityListenerResolverTest.php index 2e209e8..584e11b 100644 --- a/tests/cases/DI/Configuration/EntityListenerResolverTest.php +++ b/tests/cases/DI/Configuration/EntityListenerResolverTest.php @@ -41,4 +41,19 @@ public function testStatement(): void $this->assertInstanceOf(DefaultEntityListenerResolver::class, $configuration->getEntityListenerResolver()); } + public function testReference(): void + { + $configuration = $this->createConfiguration(function (Compiler $compiler): void { + $compiler->addConfig(NeonLoader::load(' + services: + reference: Doctrine\ORM\Mapping\DefaultEntityListenerResolver() + + nettrine.orm: + configuration: + entityListenerResolver: @reference + ')); + }); + $this->assertInstanceOf(DefaultEntityListenerResolver::class, $configuration->getEntityListenerResolver()); + } + } diff --git a/tests/cases/DI/Configuration/NamingStrategyTest.php b/tests/cases/DI/Configuration/NamingStrategyTest.php index 00d5eaa..f62dc7f 100644 --- a/tests/cases/DI/Configuration/NamingStrategyTest.php +++ b/tests/cases/DI/Configuration/NamingStrategyTest.php @@ -40,4 +40,19 @@ public function testStatement(): void $this->assertInstanceOf(UnderscoreNamingStrategy::class, $configuration->getNamingStrategy()); } + public function testReference(): void + { + $configuration = $this->createConfiguration(function (Compiler $compiler): void { + $compiler->addConfig(NeonLoader::load(' + services: + reference: Doctrine\ORM\Mapping\UnderscoreNamingStrategy() + + nettrine.orm: + configuration: + namingStrategy: @reference + ')); + }); + $this->assertInstanceOf(UnderscoreNamingStrategy::class, $configuration->getNamingStrategy()); + } + } diff --git a/tests/cases/DI/Configuration/QuoteStrategyTest.php b/tests/cases/DI/Configuration/QuoteStrategyTest.php index d0440b9..58f4e38 100644 --- a/tests/cases/DI/Configuration/QuoteStrategyTest.php +++ b/tests/cases/DI/Configuration/QuoteStrategyTest.php @@ -41,4 +41,19 @@ public function testStatement(): void $this->assertInstanceOf(AnsiQuoteStrategy::class, $configuration->getQuoteStrategy()); } + public function testReference(): void + { + $configuration = $this->createConfiguration(function (Compiler $compiler): void { + $compiler->addConfig(NeonLoader::load(' + services: + reference: Doctrine\ORM\Mapping\AnsiQuoteStrategy() + + nettrine.orm: + configuration: + quoteStrategy: @reference + ')); + }); + $this->assertInstanceOf(AnsiQuoteStrategy::class, $configuration->getQuoteStrategy()); + } + } diff --git a/tests/cases/DI/Configuration/RepositoryFactoryTest.php b/tests/cases/DI/Configuration/RepositoryFactoryTest.php index d6ab0b7..0bf2e4a 100644 --- a/tests/cases/DI/Configuration/RepositoryFactoryTest.php +++ b/tests/cases/DI/Configuration/RepositoryFactoryTest.php @@ -40,4 +40,19 @@ public function testStatement(): void $this->assertInstanceOf(DefaultRepositoryFactory::class, $configuration->getRepositoryFactory()); } + public function testReference(): void + { + $configuration = $this->createConfiguration(function (Compiler $compiler): void { + $compiler->addConfig(NeonLoader::load(' + services: + reference: Doctrine\ORM\Repository\DefaultRepositoryFactory() + + nettrine.orm: + configuration: + repositoryFactory: @reference + ')); + }); + $this->assertInstanceOf(DefaultRepositoryFactory::class, $configuration->getRepositoryFactory()); + } + }