Code Duplication    Length = 15-16 lines in 2 locations

Tests/DependencyInjection/AbstractDoctrineExtensionTest.php 2 locations

@@ 442-457 (lines=16) @@
439
        $this->assertDICDefinitionClass($definition, '%doctrine_cache.apc.class%');
440
    }
441
442
    public function testEntityManagerMemcacheMetadataCacheDriverConfiguration()
443
    {
444
        $container = $this->loadContainer('orm_service_simple_single_entity_manager');
445
446
        $definition = $container->getDefinition($container->getAlias('doctrine.orm.default_metadata_cache'));
447
        $this->assertDICDefinitionClass($definition, '%doctrine_cache.memcache.class%');
448
        $this->assertDICDefinitionMethodCallOnce($definition, 'setMemcache',
449
            array(new Reference('doctrine_cache.services.doctrine.orm.default_metadata_cache.connection'))
450
        );
451
452
        $definition = $container->getDefinition('doctrine_cache.services.doctrine.orm.default_metadata_cache.connection');
453
        $this->assertDICDefinitionClass($definition, '%doctrine_cache.memcache.connection.class%');
454
        $this->assertDICDefinitionMethodCallOnce($definition, 'addServer', array(
455
            'localhost', '11211',
456
        ));
457
    }
458
459
    public function testEntityManagerRedisMetadataCacheDriverConfigurationWithDatabaseKey()
460
    {
@@ 459-473 (lines=15) @@
456
        ));
457
    }
458
459
    public function testEntityManagerRedisMetadataCacheDriverConfigurationWithDatabaseKey()
460
    {
461
        $container = $this->loadContainer('orm_service_simple_single_entity_manager_redis');
462
463
        $definition = $container->getDefinition($container->getAlias('doctrine.orm.default_metadata_cache'));
464
        $this->assertDICDefinitionClass($definition, '%doctrine_cache.redis.class%');
465
        $this->assertDICDefinitionMethodCallOnce($definition, 'setRedis',
466
            array(new Reference('doctrine_cache.services.doctrine.orm.default_metadata_cache_redis.connection'))
467
        );
468
469
        $definition = $container->getDefinition('doctrine_cache.services.doctrine.orm.default_metadata_cache_redis.connection');
470
        $this->assertDICDefinitionClass($definition, '%doctrine_cache.redis.connection.class%');
471
        $this->assertDICDefinitionMethodCallOnce($definition, 'connect', array('localhost', '6379'));
472
        $this->assertDICDefinitionMethodCallOnce($definition, 'select', array(1));
473
    }
474
475
    public function testDependencyInjectionImportsOverrideDefaults()
476
    {