Code Duplication    Length = 8-9 lines in 2 locations

tests/TDBMServiceTest.php 2 locations

@@ 504-512 (lines=9) @@
501
        $page[0] = 'foo';
502
    }
503
504
    public function testToArray()
505
    {
506
        $beans = $this->tdbmService->findObjects('contact', 'contact.id = :id', ['id' => 1], null, [], null, TDBMObject::class);
507
508
        $beanArray = $beans->toArray();
509
510
        $this->assertCount(1, $beanArray);
511
        $this->assertEquals(1, $beanArray[0]->getProperty('id', 'contact'));
512
    }
513
514
    public function testCursorMode()
515
    {
@@ 623-630 (lines=8) @@
620
        $bean = $this->tdbmService->findObject('contact');
621
    }
622
623
    public function testFindObjectsByBean()
624
    {
625
        $countryBean = $this->tdbmService->findObject('country', 'id = :id', ['id' => 1], [], TDBMObject::class);
626
627
        $users = $this->tdbmService->findObjects('users', $countryBean, [], null, [], null, TDBMObject::class);
628
        $this->assertCount(1, $users);
629
        $this->assertEquals('jean.dupont', $users[0]->getProperty('login', 'users'));
630
    }
631
632
    /**
633
     * @expectedException \TheCodingMachine\TDBM\TDBMException