Code Duplication    Length = 24-27 lines in 2 locations

eZ/Publish/Core/Persistence/Legacy/Tests/Content/Gateway/DoctrineDatabaseTest.php 2 locations

@@ 828-851 (lines=24) @@
825
     * @covers \eZ\Publish\Core\Persistence\Legacy\Content\Gateway\DoctrineDatabase::load
826
     * @covers \eZ\Publish\Core\Persistence\Legacy\Content\Gateway\DoctrineDatabase\QueryBuilder
827
     */
828
    public function testLoadWithSingleTranslation()
829
    {
830
        $this->insertDatabaseFixture(
831
            __DIR__ . '/../_fixtures/contentobjects.php'
832
        );
833
834
        $gateway = $this->getDatabaseGateway();
835
        $res = $gateway->load(226, 2, array('eng-GB'));
836
837
        $this->assertValuesInRows(
838
            'ezcontentobject_attribute_language_code',
839
            array('eng-GB'),
840
            $res
841
        );
842
        $this->assertValuesInRows(
843
            'ezcontentobject_attribute_language_id',
844
            array('4'),
845
            $res
846
        );
847
        $this->assertEquals(
848
            1,
849
            count($res)
850
        );
851
    }
852
853
    /**
854
     * @covers \eZ\Publish\Core\Persistence\Legacy\Content\Gateway\DoctrineDatabase::load
@@ 1314-1340 (lines=27) @@
1311
    /**
1312
     * @covers \eZ\Publish\Core\Persistence\Legacy\Content\Gateway\DoctrineDatabase::loadRelations
1313
     */
1314
    public function testLoadRelations()
1315
    {
1316
        $this->insertRelationFixture();
1317
1318
        $gateway = $this->getDatabaseGateway();
1319
1320
        $relations = $gateway->loadRelations(57);
1321
1322
        $this->assertEquals(3, count($relations));
1323
1324
        $this->assertValuesInRows(
1325
            'ezcontentobject_link_to_contentobject_id',
1326
            array(58, 59, 60),
1327
            $relations
1328
        );
1329
1330
        $this->assertValuesInRows(
1331
            'ezcontentobject_link_from_contentobject_id',
1332
            array(57),
1333
            $relations
1334
        );
1335
        $this->assertValuesInRows(
1336
            'ezcontentobject_link_from_contentobject_version',
1337
            array(2),
1338
            $relations
1339
        );
1340
    }
1341
1342
    /**
1343
     * @covers \eZ\Publish\Core\Persistence\Legacy\Content\Gateway\DoctrineDatabase::loadRelations