Code Duplication    Length = 6-6 lines in 7 locations

Tests/DependencyInjection/AbstractDoctrineExtensionTest.php 4 locations

@@ 202-207 (lines=6) @@
199
200
        $definition = $container->getDefinition('doctrine.orm.default_entity_manager');
201
        $this->assertEquals('%doctrine.orm.entity_manager.class%', $definition->getClass());
202
        if (method_exists($definition, 'getFactory')) {
203
            $this->assertEquals(array('%doctrine.orm.entity_manager.class%', 'create'), $definition->getFactory());
204
        } else {
205
            $this->assertEquals('%doctrine.orm.entity_manager.class%', $definition->getFactoryClass());
206
            $this->assertEquals('create', $definition->getFactoryMethod());
207
        }
208
209
        $this->assertDICConstructorArguments($definition, array(
210
            new Reference('doctrine.dbal.default_connection'), new Reference('doctrine.orm.default_configuration'),
@@ 282-287 (lines=6) @@
279
280
        $definition = $container->getDefinition('doctrine.orm.default_entity_manager');
281
        $this->assertEquals('%doctrine.orm.entity_manager.class%', $definition->getClass());
282
        if (method_exists($definition, 'setFactory')) {
283
            $this->assertEquals(array('%doctrine.orm.entity_manager.class%', 'create'), $definition->getFactory());
284
        } else {
285
            $this->assertEquals('%doctrine.orm.entity_manager.class%', $definition->getFactoryClass());
286
            $this->assertEquals('create', $definition->getFactoryMethod());
287
        }
288
289
        $this->assertDICConstructorArguments($definition, array(
290
            new Reference('doctrine.dbal.default_connection'), new Reference('doctrine.orm.default_configuration'),
@@ 314-319 (lines=6) @@
311
312
        $definition = $container->getDefinition('doctrine.orm.em1_entity_manager');
313
        $this->assertEquals('%doctrine.orm.entity_manager.class%', $definition->getClass());
314
        if (method_exists($definition, 'getFactory')) {
315
            $this->assertEquals(array('%doctrine.orm.entity_manager.class%', 'create'), $definition->getFactory());
316
        } else {
317
            $this->assertEquals('%doctrine.orm.entity_manager.class%', $definition->getFactoryClass());
318
            $this->assertEquals('create', $definition->getFactoryMethod());
319
        }
320
321
        $arguments = $definition->getArguments();
322
        $this->assertInstanceOf('Symfony\Component\DependencyInjection\Reference', $arguments[0]);
@@ 338-343 (lines=6) @@
335
336
        $definition = $container->getDefinition('doctrine.orm.em2_entity_manager');
337
        $this->assertEquals('%doctrine.orm.entity_manager.class%', $definition->getClass());
338
        if (method_exists($definition, 'getFactory')) {
339
            $this->assertEquals(array('%doctrine.orm.entity_manager.class%', 'create'), $definition->getFactory());
340
        } else {
341
            $this->assertEquals('%doctrine.orm.entity_manager.class%', $definition->getFactoryClass());
342
            $this->assertEquals('create', $definition->getFactoryMethod());
343
        }
344
345
        $arguments = $definition->getArguments();
346
        $this->assertInstanceOf('Symfony\Component\DependencyInjection\Reference', $arguments[0]);

Tests/DependencyInjection/DoctrineExtensionTest.php 3 locations

@@ 311-316 (lines=6) @@
308
309
        $definition = $container->getDefinition('doctrine.orm.default_entity_manager');
310
        $this->assertEquals('%doctrine.orm.entity_manager.class%', $definition->getClass());
311
        if (method_exists($definition, 'getFactory')) {
312
            $this->assertEquals(array('%doctrine.orm.entity_manager.class%', 'create'), $definition->getFactory());
313
        } else {
314
            $this->assertEquals('%doctrine.orm.entity_manager.class%', $definition->getFactoryClass());
315
            $this->assertEquals('create', $definition->getFactoryMethod());
316
        }
317
318
        $this->assertEquals(array('default' => 'doctrine.orm.default_entity_manager'), $container->getParameter('doctrine.entity_managers'), "Set of the existing EntityManagers names is incorrect.");
319
        $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(array('%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, array(
411
            new Reference('doctrine.dbal.default_connection'), new Reference('doctrine.orm.default_configuration'),
@@ 473-478 (lines=6) @@
470
471
        $definition = $container->getDefinition('doctrine.orm.default_entity_manager');
472
        $this->assertEquals('%doctrine.orm.entity_manager.class%', $definition->getClass());
473
        if (method_exists($definition, 'getFactory')) {
474
            $this->assertEquals(array('%doctrine.orm.entity_manager.class%', 'create'), $definition->getFactory());
475
        } else {
476
            $this->assertEquals('%doctrine.orm.entity_manager.class%', $definition->getFactoryClass());
477
            $this->assertEquals('create', $definition->getFactoryMethod());
478
        }
479
480
        $this->assertDICConstructorArguments($definition, array(
481
            new Reference('doctrine.dbal.default_connection'), new Reference('doctrine.orm.default_configuration'),