Code Duplication    Length = 25-26 lines in 2 locations

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

@@ 1144-1169 (lines=26) @@
1141
     * @see \eZ\Publish\API\Repository\LocationService::loadLocationChildren($location, $offset)
1142
     * @depends eZ\Publish\API\Repository\Tests\LocationServiceTest::testLoadLocationChildrenWithOffset
1143
     */
1144
    public function testLoadLocationChildrenDataWithOffset(LocationList $locations)
1145
    {
1146
        $this->assertEquals(3, count($locations->locations));
1147
        $this->assertEquals(5, $locations->totalCount);
1148
1149
        foreach ($locations->locations as $location) {
1150
            $this->assertInstanceOf(
1151
                '\\eZ\\Publish\\API\\Repository\\Values\\Content\\Location',
1152
                $location
1153
            );
1154
        }
1155
1156
        $this->assertEquals(
1157
            [
1158
                $this->generateId('location', 14),
1159
                $this->generateId('location', 44),
1160
                $this->generateId('location', 61),
1161
            ],
1162
            array_map(
1163
                function (Location $location) {
1164
                    return $location->id;
1165
                },
1166
                $locations->locations
1167
            )
1168
        );
1169
    }
1170
1171
    /**
1172
     * Test for the loadLocationChildren() method.
@@ 1208-1232 (lines=25) @@
1205
     * @see \eZ\Publish\API\Repository\LocationService::loadLocationChildren($location, $offset, $limit)
1206
     * @depends eZ\Publish\API\Repository\Tests\LocationServiceTest::testLoadLocationChildrenWithOffsetAndLimit
1207
     */
1208
    public function testLoadLocationChildrenDataWithOffsetAndLimit(LocationList $locations)
1209
    {
1210
        $this->assertEquals(2, count($locations->locations));
1211
        $this->assertEquals(5, $locations->totalCount);
1212
1213
        foreach ($locations->locations as $location) {
1214
            $this->assertInstanceOf(
1215
                '\\eZ\\Publish\\API\\Repository\\Values\\Content\\Location',
1216
                $location
1217
            );
1218
        }
1219
1220
        $this->assertEquals(
1221
            [
1222
                $this->generateId('location', 14),
1223
                $this->generateId('location', 44),
1224
            ],
1225
            array_map(
1226
                function (Location $location) {
1227
                    return $location->id;
1228
                },
1229
                $locations->locations
1230
            )
1231
        );
1232
    }
1233
1234
    /**
1235
     * Test for the newLocationUpdateStruct() method.