Code Duplication    Length = 10-12 lines in 2 locations

tests/TdbmDbProviderTest.php 2 locations

@@ 13-22 (lines=10) @@
10
11
class TdbmDbProviderTest extends TestCase
12
{
13
    public function testGetClassName()
14
    {
15
        $tdbmService = $this->createMock(TDBMService::class);
16
        $tdbmService->method('getBeanClassName')
17
            ->willReturn('App\Bean\Foo');
18
19
        $provider = new TdbmDbProvider($tdbmService);
20
21
        $this->assertSame('App\Bean\Foo', $provider->getClassName('foo'));
22
    }
23
24
    public function testGetObjectNoPk()
25
    {
@@ 24-35 (lines=12) @@
21
        $this->assertSame('App\Bean\Foo', $provider->getClassName('foo'));
22
    }
23
24
    public function testGetObjectNoPk()
25
    {
26
        $tdbmService = $this->createMock(TDBMService::class);
27
        $tdbmService->method('_getPrimaryKeysFromObjectData')
28
            ->willReturn([]);
29
30
        $provider = new TdbmDbProvider($tdbmService);
31
32
33
34
        $this->assertNull($provider->getObject('foo', ['some_column_not_id'=>42]));
35
    }
36
37
    public function testGetObjectExistingPk()
38
    {