Code Duplication    Length = 15-16 lines in 2 locations

Tests/DependencyInjection/AbstractDoctrineExtensionTest.php 2 locations

@@ 429-444 (lines=16) @@
426
        $this->assertDICDefinitionClass($definition, '%doctrine_cache.apc.class%');
427
    }
428
429
    public function testEntityManagerMemcacheMetadataCacheDriverConfiguration()
430
    {
431
        $container = $this->loadContainer('orm_service_simple_single_entity_manager');
432
433
        $definition = $container->getDefinition($container->getAlias('doctrine.orm.default_metadata_cache'));
434
        $this->assertDICDefinitionClass($definition, '%doctrine_cache.memcache.class%');
435
        $this->assertDICDefinitionMethodCallOnce($definition, 'setMemcache',
436
            array(new Reference('doctrine_cache.services.doctrine.orm.default_metadata_cache.connection'))
437
        );
438
439
        $definition = $container->getDefinition('doctrine_cache.services.doctrine.orm.default_metadata_cache.connection');
440
        $this->assertDICDefinitionClass($definition, '%doctrine_cache.memcache.connection.class%');
441
        $this->assertDICDefinitionMethodCallOnce($definition, 'addServer', array(
442
            'localhost', '11211',
443
        ));
444
    }
445
446
    public function testEntityManagerRedisMetadataCacheDriverConfigurationWithDatabaseKey()
447
    {
@@ 446-460 (lines=15) @@
443
        ));
444
    }
445
446
    public function testEntityManagerRedisMetadataCacheDriverConfigurationWithDatabaseKey()
447
    {
448
        $container = $this->loadContainer('orm_service_simple_single_entity_manager_redis');
449
450
        $definition = $container->getDefinition($container->getAlias('doctrine.orm.default_metadata_cache'));
451
        $this->assertDICDefinitionClass($definition, '%doctrine_cache.redis.class%');
452
        $this->assertDICDefinitionMethodCallOnce($definition, 'setRedis',
453
            array(new Reference('doctrine_cache.services.doctrine.orm.default_metadata_cache_redis.connection'))
454
        );
455
456
        $definition = $container->getDefinition('doctrine_cache.services.doctrine.orm.default_metadata_cache_redis.connection');
457
        $this->assertDICDefinitionClass($definition, '%doctrine_cache.redis.connection.class%');
458
        $this->assertDICDefinitionMethodCallOnce($definition, 'connect', array('localhost', '6379'));
459
        $this->assertDICDefinitionMethodCallOnce($definition, 'select', array(1));
460
    }
461
462
    public function testDependencyInjectionImportsOverrideDefaults()
463
    {