Code Duplication    Length = 10-16 lines in 2 locations

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

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