File tree Expand file tree Collapse file tree 4 files changed +60
-0
lines changed
tests/cases/DI/Configuration Expand file tree Collapse file tree 4 files changed +60
-0
lines changed Original file line number Diff line number Diff line change @@ -41,4 +41,19 @@ public function testStatement(): void
4141 $ this ->assertInstanceOf (DefaultEntityListenerResolver::class, $ configuration ->getEntityListenerResolver ());
4242 }
4343
44+ public function testReference (): void
45+ {
46+ $ configuration = $ this ->createConfiguration (function (Compiler $ compiler ): void {
47+ $ compiler ->addConfig (NeonLoader::load ('
48+ services:
49+ reference: Doctrine\ORM\Mapping\DefaultEntityListenerResolver()
50+
51+ nettrine.orm:
52+ configuration:
53+ entityListenerResolver: @reference
54+ ' ));
55+ });
56+ $ this ->assertInstanceOf (DefaultEntityListenerResolver::class, $ configuration ->getEntityListenerResolver ());
57+ }
58+
4459}
Original file line number Diff line number Diff line change @@ -40,4 +40,19 @@ public function testStatement(): void
4040 $ this ->assertInstanceOf (UnderscoreNamingStrategy::class, $ configuration ->getNamingStrategy ());
4141 }
4242
43+ public function testReference (): void
44+ {
45+ $ configuration = $ this ->createConfiguration (function (Compiler $ compiler ): void {
46+ $ compiler ->addConfig (NeonLoader::load ('
47+ services:
48+ reference: Doctrine\ORM\Mapping\UnderscoreNamingStrategy()
49+
50+ nettrine.orm:
51+ configuration:
52+ namingStrategy: @reference
53+ ' ));
54+ });
55+ $ this ->assertInstanceOf (UnderscoreNamingStrategy::class, $ configuration ->getNamingStrategy ());
56+ }
57+
4358}
Original file line number Diff line number Diff line change @@ -41,4 +41,19 @@ public function testStatement(): void
4141 $ this ->assertInstanceOf (AnsiQuoteStrategy::class, $ configuration ->getQuoteStrategy ());
4242 }
4343
44+ public function testReference (): void
45+ {
46+ $ configuration = $ this ->createConfiguration (function (Compiler $ compiler ): void {
47+ $ compiler ->addConfig (NeonLoader::load ('
48+ services:
49+ reference: Doctrine\ORM\Mapping\AnsiQuoteStrategy()
50+
51+ nettrine.orm:
52+ configuration:
53+ quoteStrategy: @reference
54+ ' ));
55+ });
56+ $ this ->assertInstanceOf (AnsiQuoteStrategy::class, $ configuration ->getQuoteStrategy ());
57+ }
58+
4459}
Original file line number Diff line number Diff line change @@ -40,4 +40,19 @@ public function testStatement(): void
4040 $ this ->assertInstanceOf (DefaultRepositoryFactory::class, $ configuration ->getRepositoryFactory ());
4141 }
4242
43+ public function testReference (): void
44+ {
45+ $ configuration = $ this ->createConfiguration (function (Compiler $ compiler ): void {
46+ $ compiler ->addConfig (NeonLoader::load ('
47+ services:
48+ reference: Doctrine\ORM\Repository\DefaultRepositoryFactory()
49+
50+ nettrine.orm:
51+ configuration:
52+ repositoryFactory: @reference
53+ ' ));
54+ });
55+ $ this ->assertInstanceOf (DefaultRepositoryFactory::class, $ configuration ->getRepositoryFactory ());
56+ }
57+
4358}
You can’t perform that action at this time.
0 commit comments