| @@ 209-214 (lines=6) @@ | ||
| 206 | ||
| 207 | $definition = $container->getDefinition('doctrine.orm.default_entity_manager'); |
|
| 208 | $this->assertEquals('%doctrine.orm.entity_manager.class%', $definition->getClass()); |
|
| 209 | if (method_exists($definition, 'getFactory')) { |
|
| 210 | $this->assertEquals(['%doctrine.orm.entity_manager.class%', 'create'], $definition->getFactory()); |
|
| 211 | } else { |
|
| 212 | $this->assertEquals('%doctrine.orm.entity_manager.class%', $definition->getFactoryClass()); |
|
| 213 | $this->assertEquals('create', $definition->getFactoryMethod()); |
|
| 214 | } |
|
| 215 | ||
| 216 | $this->assertDICConstructorArguments($definition, [ |
|
| 217 | new Reference('doctrine.dbal.default_connection'), |
|
| @@ 290-295 (lines=6) @@ | ||
| 287 | ||
| 288 | $definition = $container->getDefinition('doctrine.orm.default_entity_manager'); |
|
| 289 | $this->assertEquals('%doctrine.orm.entity_manager.class%', $definition->getClass()); |
|
| 290 | if (method_exists($definition, 'setFactory')) { |
|
| 291 | $this->assertEquals(['%doctrine.orm.entity_manager.class%', 'create'], $definition->getFactory()); |
|
| 292 | } else { |
|
| 293 | $this->assertEquals('%doctrine.orm.entity_manager.class%', $definition->getFactoryClass()); |
|
| 294 | $this->assertEquals('create', $definition->getFactoryMethod()); |
|
| 295 | } |
|
| 296 | ||
| 297 | $this->assertDICConstructorArguments($definition, [ |
|
| 298 | new Reference('doctrine.dbal.default_connection'), |
|
| @@ 323-328 (lines=6) @@ | ||
| 320 | ||
| 321 | $definition = $container->getDefinition('doctrine.orm.em1_entity_manager'); |
|
| 322 | $this->assertEquals('%doctrine.orm.entity_manager.class%', $definition->getClass()); |
|
| 323 | if (method_exists($definition, 'getFactory')) { |
|
| 324 | $this->assertEquals(['%doctrine.orm.entity_manager.class%', 'create'], $definition->getFactory()); |
|
| 325 | } else { |
|
| 326 | $this->assertEquals('%doctrine.orm.entity_manager.class%', $definition->getFactoryClass()); |
|
| 327 | $this->assertEquals('create', $definition->getFactoryMethod()); |
|
| 328 | } |
|
| 329 | ||
| 330 | $arguments = $definition->getArguments(); |
|
| 331 | $this->assertInstanceOf('Symfony\Component\DependencyInjection\Reference', $arguments[0]); |
|
| @@ 347-352 (lines=6) @@ | ||
| 344 | ||
| 345 | $definition = $container->getDefinition('doctrine.orm.em2_entity_manager'); |
|
| 346 | $this->assertEquals('%doctrine.orm.entity_manager.class%', $definition->getClass()); |
|
| 347 | if (method_exists($definition, 'getFactory')) { |
|
| 348 | $this->assertEquals(['%doctrine.orm.entity_manager.class%', 'create'], $definition->getFactory()); |
|
| 349 | } else { |
|
| 350 | $this->assertEquals('%doctrine.orm.entity_manager.class%', $definition->getFactoryClass()); |
|
| 351 | $this->assertEquals('create', $definition->getFactoryMethod()); |
|
| 352 | } |
|
| 353 | ||
| 354 | $arguments = $definition->getArguments(); |
|
| 355 | $this->assertInstanceOf('Symfony\Component\DependencyInjection\Reference', $arguments[0]); |
|
| @@ 303-308 (lines=6) @@ | ||
| 300 | ||
| 301 | $definition = $container->getDefinition('doctrine.orm.default_entity_manager'); |
|
| 302 | $this->assertEquals('%doctrine.orm.entity_manager.class%', $definition->getClass()); |
|
| 303 | if (method_exists($definition, 'getFactory')) { |
|
| 304 | $this->assertEquals(['%doctrine.orm.entity_manager.class%', 'create'], $definition->getFactory()); |
|
| 305 | } else { |
|
| 306 | $this->assertEquals('%doctrine.orm.entity_manager.class%', $definition->getFactoryClass()); |
|
| 307 | $this->assertEquals('create', $definition->getFactoryMethod()); |
|
| 308 | } |
|
| 309 | ||
| 310 | $this->assertEquals(['default' => 'doctrine.orm.default_entity_manager'], $container->getParameter('doctrine.entity_managers'), 'Set of the existing EntityManagers names is incorrect.'); |
|
| 311 | $this->assertEquals('%doctrine.entity_managers%', $container->getDefinition('doctrine')->getArgument(2), 'Set of the existing EntityManagers names is incorrect.'); |
|
| @@ 400-405 (lines=6) @@ | ||
| 397 | ||
| 398 | $definition = $container->getDefinition('doctrine.orm.default_entity_manager'); |
|
| 399 | $this->assertEquals('%doctrine.orm.entity_manager.class%', $definition->getClass()); |
|
| 400 | if (method_exists($definition, 'getFactory')) { |
|
| 401 | $this->assertEquals(['%doctrine.orm.entity_manager.class%', 'create'], $definition->getFactory()); |
|
| 402 | } else { |
|
| 403 | $this->assertEquals('%doctrine.orm.entity_manager.class%', $definition->getFactoryClass()); |
|
| 404 | $this->assertEquals('create', $definition->getFactoryMethod()); |
|
| 405 | } |
|
| 406 | ||
| 407 | $this->assertDICConstructorArguments($definition, [ |
|
| 408 | new Reference('doctrine.dbal.default_connection'), |
|
| @@ 430-435 (lines=6) @@ | ||
| 427 | ||
| 428 | $definition = $container->getDefinition('doctrine.orm.default_entity_manager'); |
|
| 429 | $this->assertEquals('%doctrine.orm.entity_manager.class%', $definition->getClass()); |
|
| 430 | if (method_exists($definition, 'getFactory')) { |
|
| 431 | $this->assertEquals(['%doctrine.orm.entity_manager.class%', 'create'], $definition->getFactory()); |
|
| 432 | } else { |
|
| 433 | $this->assertEquals('%doctrine.orm.entity_manager.class%', $definition->getFactoryClass()); |
|
| 434 | $this->assertEquals('create', $definition->getFactoryMethod()); |
|
| 435 | } |
|
| 436 | ||
| 437 | $this->assertDICConstructorArguments($definition, [ |
|
| 438 | new Reference('doctrine.dbal.default_connection'), |
|
| @@ 469-474 (lines=6) @@ | ||
| 466 | ||
| 467 | $definition = $container->getDefinition('doctrine.orm.default_entity_manager'); |
|
| 468 | $this->assertEquals('%doctrine.orm.entity_manager.class%', $definition->getClass()); |
|
| 469 | if (method_exists($definition, 'getFactory')) { |
|
| 470 | $this->assertEquals(['%doctrine.orm.entity_manager.class%', 'create'], $definition->getFactory()); |
|
| 471 | } else { |
|
| 472 | $this->assertEquals('%doctrine.orm.entity_manager.class%', $definition->getFactoryClass()); |
|
| 473 | $this->assertEquals('create', $definition->getFactoryMethod()); |
|
| 474 | } |
|
| 475 | ||
| 476 | $this->assertDICConstructorArguments($definition, [ |
|
| 477 | new Reference('doctrine.dbal.default_connection'), |
|