Code Duplication    Length = 13-13 lines in 2 locations

Tests/RegistryTest.php 2 locations

@@ 74-86 (lines=13) @@
71
        $this->assertEquals(['default' => 'doctrine.dbal.default_connection'], $registry->getConnectionNames());
72
    }
73
74
    public function testGetDefaultEntityManager()
75
    {
76
        $em        = new stdClass();
77
        $container = $this->getMockBuilder('Symfony\Component\DependencyInjection\ContainerInterface')->getMock();
78
        $container->expects($this->once())
79
                  ->method('get')
80
                  ->with($this->equalTo('doctrine.orm.default_entity_manager'))
81
                  ->will($this->returnValue($em));
82
83
        $registry = new Registry($container, [], ['default' => 'doctrine.orm.default_entity_manager'], 'default', 'default');
84
85
        $this->assertSame($em, $registry->getManager());
86
    }
87
88
    public function testGetEntityManager()
89
    {
@@ 88-100 (lines=13) @@
85
        $this->assertSame($em, $registry->getManager());
86
    }
87
88
    public function testGetEntityManager()
89
    {
90
        $em        = new stdClass();
91
        $container = $this->getMockBuilder('Symfony\Component\DependencyInjection\ContainerInterface')->getMock();
92
        $container->expects($this->once())
93
                  ->method('get')
94
                  ->with($this->equalTo('doctrine.orm.default_entity_manager'))
95
                  ->will($this->returnValue($em));
96
97
        $registry = new Registry($container, [], ['default' => 'doctrine.orm.default_entity_manager'], 'default', 'default');
98
99
        $this->assertSame($em, $registry->getManager('default'));
100
    }
101
102
    /**
103
     * @expectedException \InvalidArgumentException