Code Duplication    Length = 13-13 lines in 2 locations

Tests/RegistryTest.php 2 locations

@@ 26-38 (lines=13) @@
23
        $this->assertEquals('default', $registry->getDefaultManagerName());
24
    }
25
26
    public function testGetDefaultConnection()
27
    {
28
        $conn      = $this->getMockBuilder('Doctrine\DBAL\Connection')->disableOriginalConstructor()->getMock();
29
        $container = $this->getMockBuilder('Symfony\Component\DependencyInjection\ContainerInterface')->getMock();
30
        $container->expects($this->once())
31
                  ->method('get')
32
                  ->with($this->equalTo('doctrine.dbal.default_connection'))
33
                  ->will($this->returnValue($conn));
34
35
        $registry = new Registry($container, ['default' => 'doctrine.dbal.default_connection'], [], 'default', 'default');
36
37
        $this->assertSame($conn, $registry->getConnection());
38
    }
39
40
    public function testGetConnection()
41
    {
@@ 40-52 (lines=13) @@
37
        $this->assertSame($conn, $registry->getConnection());
38
    }
39
40
    public function testGetConnection()
41
    {
42
        $conn      = $this->getMockBuilder('Doctrine\DBAL\Connection')->disableOriginalConstructor()->getMock();
43
        $container = $this->getMockBuilder('Symfony\Component\DependencyInjection\ContainerInterface')->getMock();
44
        $container->expects($this->once())
45
                  ->method('get')
46
                  ->with($this->equalTo('doctrine.dbal.default_connection'))
47
                  ->will($this->returnValue($conn));
48
49
        $registry = new Registry($container, ['default' => 'doctrine.dbal.default_connection'], [], 'default', 'default');
50
51
        $this->assertSame($conn, $registry->getConnection('default'));
52
    }
53
54
    /**
55
     * @expectedException \InvalidArgumentException