Code Duplication    Length = 10-16 lines in 2 locations

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

@@ 1391-1400 (lines=10) @@
1388
    /**
1389
     * @covers \eZ\Publish\Core\Persistence\Legacy\Content\Gateway\DoctrineDatabase::loadRelations
1390
     */
1391
    public function testLoadRelationsNoResult()
1392
    {
1393
        $this->insertRelationFixture();
1394
1395
        $gateway = $this->getDatabaseGateway();
1396
1397
        $relations = $gateway->loadRelations(57, 1, \eZ\Publish\API\Repository\Values\Content\Relation::EMBED);
1398
1399
        $this->assertEquals(0, count($relations), 'Expecting no relation to be loaded');
1400
    }
1401
1402
    /**
1403
     * @covers \eZ\Publish\Core\Persistence\Legacy\Content\Gateway\DoctrineDatabase::loadReverseRelations
@@ 1405-1420 (lines=16) @@
1402
    /**
1403
     * @covers \eZ\Publish\Core\Persistence\Legacy\Content\Gateway\DoctrineDatabase::loadReverseRelations
1404
     */
1405
    public function testLoadReverseRelations()
1406
    {
1407
        $this->insertRelationFixture();
1408
1409
        $gateway = $this->getDatabaseGateway();
1410
1411
        $relations = $gateway->loadReverseRelations(58);
1412
1413
        self::assertEquals(2, count($relations));
1414
1415
        $this->assertValuesInRows(
1416
            'ezcontentobject_link_from_contentobject_id',
1417
            array(57, 61),
1418
            $relations
1419
        );
1420
    }
1421
1422
    /**
1423
     * @covers \eZ\Publish\Core\Persistence\Legacy\Content\Gateway\DoctrineDatabase::loadReverseRelations