| @@ 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]); |
|
| @@ 306-311 (lines=6) @@ | ||
| 303 | ||
| 304 | $definition = $container->getDefinition('doctrine.orm.default_entity_manager'); |
|
| 305 | $this->assertEquals('%doctrine.orm.entity_manager.class%', $definition->getClass()); |
|
| 306 | if (method_exists($definition, 'getFactory')) { |
|
| 307 | $this->assertEquals(['%doctrine.orm.entity_manager.class%', 'create'], $definition->getFactory()); |
|
| 308 | } else { |
|
| 309 | $this->assertEquals('%doctrine.orm.entity_manager.class%', $definition->getFactoryClass()); |
|
| 310 | $this->assertEquals('create', $definition->getFactoryMethod()); |
|
| 311 | } |
|
| 312 | ||
| 313 | $this->assertEquals(['default' => 'doctrine.orm.default_entity_manager'], $container->getParameter('doctrine.entity_managers'), 'Set of the existing EntityManagers names is incorrect.'); |
|
| 314 | $this->assertEquals('%doctrine.entity_managers%', $container->getDefinition('doctrine')->getArgument(2), 'Set of the existing EntityManagers names is incorrect.'); |
|
| @@ 403-408 (lines=6) @@ | ||
| 400 | ||
| 401 | $definition = $container->getDefinition('doctrine.orm.default_entity_manager'); |
|
| 402 | $this->assertEquals('%doctrine.orm.entity_manager.class%', $definition->getClass()); |
|
| 403 | if (method_exists($definition, 'getFactory')) { |
|
| 404 | $this->assertEquals(['%doctrine.orm.entity_manager.class%', 'create'], $definition->getFactory()); |
|
| 405 | } else { |
|
| 406 | $this->assertEquals('%doctrine.orm.entity_manager.class%', $definition->getFactoryClass()); |
|
| 407 | $this->assertEquals('create', $definition->getFactoryMethod()); |
|
| 408 | } |
|
| 409 | ||
| 410 | $this->assertDICConstructorArguments($definition, [ |
|
| 411 | new Reference('doctrine.dbal.default_connection'), |
|
| @@ 433-438 (lines=6) @@ | ||
| 430 | ||
| 431 | $definition = $container->getDefinition('doctrine.orm.default_entity_manager'); |
|
| 432 | $this->assertEquals('%doctrine.orm.entity_manager.class%', $definition->getClass()); |
|
| 433 | if (method_exists($definition, 'getFactory')) { |
|
| 434 | $this->assertEquals(['%doctrine.orm.entity_manager.class%', 'create'], $definition->getFactory()); |
|
| 435 | } else { |
|
| 436 | $this->assertEquals('%doctrine.orm.entity_manager.class%', $definition->getFactoryClass()); |
|
| 437 | $this->assertEquals('create', $definition->getFactoryMethod()); |
|
| 438 | } |
|
| 439 | ||
| 440 | $this->assertDICConstructorArguments($definition, [ |
|
| 441 | new Reference('doctrine.dbal.default_connection'), |
|
| @@ 472-477 (lines=6) @@ | ||
| 469 | ||
| 470 | $definition = $container->getDefinition('doctrine.orm.default_entity_manager'); |
|
| 471 | $this->assertEquals('%doctrine.orm.entity_manager.class%', $definition->getClass()); |
|
| 472 | if (method_exists($definition, 'getFactory')) { |
|
| 473 | $this->assertEquals(['%doctrine.orm.entity_manager.class%', 'create'], $definition->getFactory()); |
|
| 474 | } else { |
|
| 475 | $this->assertEquals('%doctrine.orm.entity_manager.class%', $definition->getFactoryClass()); |
|
| 476 | $this->assertEquals('create', $definition->getFactoryMethod()); |
|
| 477 | } |
|
| 478 | ||
| 479 | $this->assertDICConstructorArguments($definition, [ |
|
| 480 | new Reference('doctrine.dbal.default_connection'), |
|