@@ 594-606 (lines=13) @@ | ||
591 | $this->assertDICDefinitionMethodCallOnce($definition, 'addCustomDatetimeFunction', array('test_datetime', 'Symfony\Bundle\DoctrineBundle\Tests\DependencyInjection\TestDatetimeFunction')); |
|
592 | } |
|
593 | ||
594 | public function testSetNamingStrategy() |
|
595 | { |
|
596 | if (version_compare(Version::VERSION, "2.3.0-DEV") < 0) { |
|
597 | $this->markTestSkipped('Naming Strategies are not available'); |
|
598 | } |
|
599 | $container = $this->loadContainer('orm_namingstrategy'); |
|
600 | ||
601 | $def1 = $container->getDefinition('doctrine.orm.em1_configuration'); |
|
602 | $def2 = $container->getDefinition('doctrine.orm.em2_configuration'); |
|
603 | ||
604 | $this->assertDICDefinitionMethodCallOnce($def1, 'setNamingStrategy', array(0 => new Reference('doctrine.orm.naming_strategy.default'))); |
|
605 | $this->assertDICDefinitionMethodCallOnce($def2, 'setNamingStrategy', array(0 => new Reference('doctrine.orm.naming_strategy.underscore'))); |
|
606 | } |
|
607 | ||
608 | public function testSetQuoteStrategy() |
|
609 | { |
|
@@ 608-620 (lines=13) @@ | ||
605 | $this->assertDICDefinitionMethodCallOnce($def2, 'setNamingStrategy', array(0 => new Reference('doctrine.orm.naming_strategy.underscore'))); |
|
606 | } |
|
607 | ||
608 | public function testSetQuoteStrategy() |
|
609 | { |
|
610 | if (version_compare(Version::VERSION, "2.3.0-DEV") < 0) { |
|
611 | $this->markTestSkipped('Quote Strategies are not available'); |
|
612 | } |
|
613 | $container = $this->loadContainer('orm_quotestrategy'); |
|
614 | ||
615 | $def1 = $container->getDefinition('doctrine.orm.em1_configuration'); |
|
616 | $def2 = $container->getDefinition('doctrine.orm.em2_configuration'); |
|
617 | ||
618 | $this->assertDICDefinitionMethodCallOnce($def1, 'setQuoteStrategy', array(0 => new Reference('doctrine.orm.quote_strategy.default'))); |
|
619 | $this->assertDICDefinitionMethodCallOnce($def2, 'setQuoteStrategy', array(0 => new Reference('doctrine.orm.quote_strategy.ansi'))); |
|
620 | } |
|
621 | ||
622 | public function testSecondLevelCache() |
|
623 | { |