@@ 315-320 (lines=6) @@ | ||
312 | ||
313 | $definition = $container->getDefinition('doctrine.orm.default_entity_manager'); |
|
314 | $this->assertEquals('%doctrine.orm.entity_manager.class%', $definition->getClass()); |
|
315 | if (method_exists($definition, 'getFactory')) { |
|
316 | $this->assertEquals(array('%doctrine.orm.entity_manager.class%', 'create'), $definition->getFactory()); |
|
317 | } else { |
|
318 | $this->assertEquals('%doctrine.orm.entity_manager.class%', $definition->getFactoryClass()); |
|
319 | $this->assertEquals('create', $definition->getFactoryMethod()); |
|
320 | } |
|
321 | ||
322 | $this->assertEquals(array('default' => 'doctrine.orm.default_entity_manager'), $container->getParameter('doctrine.entity_managers'), "Set of the existing EntityManagers names is incorrect."); |
|
323 | $this->assertEquals('%doctrine.entity_managers%', $container->getDefinition('doctrine')->getArgument(2), "Set of the existing EntityManagers names is incorrect."); |
|
@@ 407-412 (lines=6) @@ | ||
404 | ||
405 | $definition = $container->getDefinition('doctrine.orm.default_entity_manager'); |
|
406 | $this->assertEquals('%doctrine.orm.entity_manager.class%', $definition->getClass()); |
|
407 | if (method_exists($definition, 'getFactory')) { |
|
408 | $this->assertEquals(array('%doctrine.orm.entity_manager.class%', 'create'), $definition->getFactory()); |
|
409 | } else { |
|
410 | $this->assertEquals('%doctrine.orm.entity_manager.class%', $definition->getFactoryClass()); |
|
411 | $this->assertEquals('create', $definition->getFactoryMethod()); |
|
412 | } |
|
413 | ||
414 | $this->assertDICConstructorArguments($definition, array( |
|
415 | new Reference('doctrine.dbal.default_connection'), new Reference('doctrine.orm.default_configuration'), |
|
@@ 477-482 (lines=6) @@ | ||
474 | ||
475 | $definition = $container->getDefinition('doctrine.orm.default_entity_manager'); |
|
476 | $this->assertEquals('%doctrine.orm.entity_manager.class%', $definition->getClass()); |
|
477 | if (method_exists($definition, 'getFactory')) { |
|
478 | $this->assertEquals(array('%doctrine.orm.entity_manager.class%', 'create'), $definition->getFactory()); |
|
479 | } else { |
|
480 | $this->assertEquals('%doctrine.orm.entity_manager.class%', $definition->getFactoryClass()); |
|
481 | $this->assertEquals('create', $definition->getFactoryMethod()); |
|
482 | } |
|
483 | ||
484 | $this->assertDICConstructorArguments($definition, array( |
|
485 | new Reference('doctrine.dbal.default_connection'), new Reference('doctrine.orm.default_configuration'), |
@@ 203-208 (lines=6) @@ | ||
200 | ||
201 | $definition = $container->getDefinition('doctrine.orm.default_entity_manager'); |
|
202 | $this->assertEquals('%doctrine.orm.entity_manager.class%', $definition->getClass()); |
|
203 | if (method_exists($definition, 'getFactory')) { |
|
204 | $this->assertEquals(array('%doctrine.orm.entity_manager.class%', 'create'), $definition->getFactory()); |
|
205 | } else { |
|
206 | $this->assertEquals('%doctrine.orm.entity_manager.class%', $definition->getFactoryClass()); |
|
207 | $this->assertEquals('create', $definition->getFactoryMethod()); |
|
208 | } |
|
209 | ||
210 | $this->assertDICConstructorArguments($definition, array( |
|
211 | new Reference('doctrine.dbal.default_connection'), new Reference('doctrine.orm.default_configuration'), |
|
@@ 283-288 (lines=6) @@ | ||
280 | ||
281 | $definition = $container->getDefinition('doctrine.orm.default_entity_manager'); |
|
282 | $this->assertEquals('%doctrine.orm.entity_manager.class%', $definition->getClass()); |
|
283 | if (method_exists($definition, 'setFactory')) { |
|
284 | $this->assertEquals(array('%doctrine.orm.entity_manager.class%', 'create'), $definition->getFactory()); |
|
285 | } else { |
|
286 | $this->assertEquals('%doctrine.orm.entity_manager.class%', $definition->getFactoryClass()); |
|
287 | $this->assertEquals('create', $definition->getFactoryMethod()); |
|
288 | } |
|
289 | ||
290 | $this->assertDICConstructorArguments($definition, array( |
|
291 | new Reference('doctrine.dbal.default_connection'), new Reference('doctrine.orm.default_configuration'), |
|
@@ 315-320 (lines=6) @@ | ||
312 | ||
313 | $definition = $container->getDefinition('doctrine.orm.em1_entity_manager'); |
|
314 | $this->assertEquals('%doctrine.orm.entity_manager.class%', $definition->getClass()); |
|
315 | if (method_exists($definition, 'getFactory')) { |
|
316 | $this->assertEquals(array('%doctrine.orm.entity_manager.class%', 'create'), $definition->getFactory()); |
|
317 | } else { |
|
318 | $this->assertEquals('%doctrine.orm.entity_manager.class%', $definition->getFactoryClass()); |
|
319 | $this->assertEquals('create', $definition->getFactoryMethod()); |
|
320 | } |
|
321 | ||
322 | $arguments = $definition->getArguments(); |
|
323 | $this->assertInstanceOf('Symfony\Component\DependencyInjection\Reference', $arguments[0]); |
|
@@ 339-344 (lines=6) @@ | ||
336 | ||
337 | $definition = $container->getDefinition('doctrine.orm.em2_entity_manager'); |
|
338 | $this->assertEquals('%doctrine.orm.entity_manager.class%', $definition->getClass()); |
|
339 | if (method_exists($definition, 'getFactory')) { |
|
340 | $this->assertEquals(array('%doctrine.orm.entity_manager.class%', 'create'), $definition->getFactory()); |
|
341 | } else { |
|
342 | $this->assertEquals('%doctrine.orm.entity_manager.class%', $definition->getFactoryClass()); |
|
343 | $this->assertEquals('create', $definition->getFactoryMethod()); |
|
344 | } |
|
345 | ||
346 | $arguments = $definition->getArguments(); |
|
347 | $this->assertInstanceOf('Symfony\Component\DependencyInjection\Reference', $arguments[0]); |