Code Duplication    Length = 25-26 lines in 2 locations

eZ/Publish/API/Repository/Tests/LocationServiceTest.php 2 locations

@@ 1037-1062 (lines=26) @@
1034
     * @see \eZ\Publish\API\Repository\LocationService::loadLocationChildren($location, $offset)
1035
     * @depends eZ\Publish\API\Repository\Tests\LocationServiceTest::testLoadLocationChildrenWithOffset
1036
     */
1037
    public function testLoadLocationChildrenDataWithOffset(LocationList $locations)
1038
    {
1039
        $this->assertEquals(3, count($locations->locations));
1040
        $this->assertEquals(5, $locations->totalCount);
1041
1042
        foreach ($locations->locations as $location) {
1043
            $this->assertInstanceOf(
1044
                '\\eZ\\Publish\\API\\Repository\\Values\\Content\\Location',
1045
                $location
1046
            );
1047
        }
1048
1049
        $this->assertEquals(
1050
            array(
1051
                $this->generateId('location', 14),
1052
                $this->generateId('location', 44),
1053
                $this->generateId('location', 61),
1054
            ),
1055
            array_map(
1056
                function (Location $location) {
1057
                    return $location->id;
1058
                },
1059
                $locations->locations
1060
            )
1061
        );
1062
    }
1063
1064
    /**
1065
     * Test for the loadLocationChildren() method.
@@ 1101-1125 (lines=25) @@
1098
     * @see \eZ\Publish\API\Repository\LocationService::loadLocationChildren($location, $offset, $limit)
1099
     * @depends eZ\Publish\API\Repository\Tests\LocationServiceTest::testLoadLocationChildrenWithOffsetAndLimit
1100
     */
1101
    public function testLoadLocationChildrenDataWithOffsetAndLimit(LocationList $locations)
1102
    {
1103
        $this->assertEquals(2, count($locations->locations));
1104
        $this->assertEquals(5, $locations->totalCount);
1105
1106
        foreach ($locations->locations as $location) {
1107
            $this->assertInstanceOf(
1108
                '\\eZ\\Publish\\API\\Repository\\Values\\Content\\Location',
1109
                $location
1110
            );
1111
        }
1112
1113
        $this->assertEquals(
1114
            array(
1115
                $this->generateId('location', 14),
1116
                $this->generateId('location', 44),
1117
            ),
1118
            array_map(
1119
                function (Location $location) {
1120
                    return $location->id;
1121
                },
1122
                $locations->locations
1123
            )
1124
        );
1125
    }
1126
1127
    /**
1128
     * Test for the newLocationUpdateStruct() method.