| @@ 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'), |
|
| @@ 210-215 (lines=6) @@ | ||
| 207 | ||
| 208 | $definition = $container->getDefinition('doctrine.orm.default_entity_manager'); |
|
| 209 | $this->assertEquals('%doctrine.orm.entity_manager.class%', $definition->getClass()); |
|
| 210 | if (method_exists($definition, 'getFactory')) { |
|
| 211 | $this->assertEquals(['%doctrine.orm.entity_manager.class%', 'create'], $definition->getFactory()); |
|
| 212 | } else { |
|
| 213 | $this->assertEquals('%doctrine.orm.entity_manager.class%', $definition->getFactoryClass()); |
|
| 214 | $this->assertEquals('create', $definition->getFactoryMethod()); |
|
| 215 | } |
|
| 216 | ||
| 217 | $this->assertDICConstructorArguments($definition, [ |
|
| 218 | new Reference('doctrine.dbal.default_connection'), |
|
| @@ 291-296 (lines=6) @@ | ||
| 288 | ||
| 289 | $definition = $container->getDefinition('doctrine.orm.default_entity_manager'); |
|
| 290 | $this->assertEquals('%doctrine.orm.entity_manager.class%', $definition->getClass()); |
|
| 291 | if (method_exists($definition, 'setFactory')) { |
|
| 292 | $this->assertEquals(['%doctrine.orm.entity_manager.class%', 'create'], $definition->getFactory()); |
|
| 293 | } else { |
|
| 294 | $this->assertEquals('%doctrine.orm.entity_manager.class%', $definition->getFactoryClass()); |
|
| 295 | $this->assertEquals('create', $definition->getFactoryMethod()); |
|
| 296 | } |
|
| 297 | ||
| 298 | $this->assertDICConstructorArguments($definition, [ |
|
| 299 | new Reference('doctrine.dbal.default_connection'), |
|
| @@ 324-329 (lines=6) @@ | ||
| 321 | ||
| 322 | $definition = $container->getDefinition('doctrine.orm.em1_entity_manager'); |
|
| 323 | $this->assertEquals('%doctrine.orm.entity_manager.class%', $definition->getClass()); |
|
| 324 | if (method_exists($definition, 'getFactory')) { |
|
| 325 | $this->assertEquals(['%doctrine.orm.entity_manager.class%', 'create'], $definition->getFactory()); |
|
| 326 | } else { |
|
| 327 | $this->assertEquals('%doctrine.orm.entity_manager.class%', $definition->getFactoryClass()); |
|
| 328 | $this->assertEquals('create', $definition->getFactoryMethod()); |
|
| 329 | } |
|
| 330 | ||
| 331 | $arguments = $definition->getArguments(); |
|
| 332 | $this->assertInstanceOf('Symfony\Component\DependencyInjection\Reference', $arguments[0]); |
|
| @@ 348-353 (lines=6) @@ | ||
| 345 | ||
| 346 | $definition = $container->getDefinition('doctrine.orm.em2_entity_manager'); |
|
| 347 | $this->assertEquals('%doctrine.orm.entity_manager.class%', $definition->getClass()); |
|
| 348 | if (method_exists($definition, 'getFactory')) { |
|
| 349 | $this->assertEquals(['%doctrine.orm.entity_manager.class%', 'create'], $definition->getFactory()); |
|
| 350 | } else { |
|
| 351 | $this->assertEquals('%doctrine.orm.entity_manager.class%', $definition->getFactoryClass()); |
|
| 352 | $this->assertEquals('create', $definition->getFactoryMethod()); |
|
| 353 | } |
|
| 354 | ||
| 355 | $arguments = $definition->getArguments(); |
|
| 356 | $this->assertInstanceOf('Symfony\Component\DependencyInjection\Reference', $arguments[0]); |
|