Code Duplication    Length = 25-26 lines in 2 locations

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

@@ 1107-1132 (lines=26) @@
1104
     * @see \eZ\Publish\API\Repository\LocationService::loadLocationChildren($location, $offset)
1105
     * @depends eZ\Publish\API\Repository\Tests\LocationServiceTest::testLoadLocationChildrenWithOffset
1106
     */
1107
    public function testLoadLocationChildrenDataWithOffset(LocationList $locations)
1108
    {
1109
        $this->assertEquals(3, count($locations->locations));
1110
        $this->assertEquals(5, $locations->totalCount);
1111
1112
        foreach ($locations->locations as $location) {
1113
            $this->assertInstanceOf(
1114
                '\\eZ\\Publish\\API\\Repository\\Values\\Content\\Location',
1115
                $location
1116
            );
1117
        }
1118
1119
        $this->assertEquals(
1120
            [
1121
                $this->generateId('location', 14),
1122
                $this->generateId('location', 44),
1123
                $this->generateId('location', 61),
1124
            ],
1125
            array_map(
1126
                function (Location $location) {
1127
                    return $location->id;
1128
                },
1129
                $locations->locations
1130
            )
1131
        );
1132
    }
1133
1134
    /**
1135
     * Test for the loadLocationChildren() method.
@@ 1171-1195 (lines=25) @@
1168
     * @see \eZ\Publish\API\Repository\LocationService::loadLocationChildren($location, $offset, $limit)
1169
     * @depends eZ\Publish\API\Repository\Tests\LocationServiceTest::testLoadLocationChildrenWithOffsetAndLimit
1170
     */
1171
    public function testLoadLocationChildrenDataWithOffsetAndLimit(LocationList $locations)
1172
    {
1173
        $this->assertEquals(2, count($locations->locations));
1174
        $this->assertEquals(5, $locations->totalCount);
1175
1176
        foreach ($locations->locations as $location) {
1177
            $this->assertInstanceOf(
1178
                '\\eZ\\Publish\\API\\Repository\\Values\\Content\\Location',
1179
                $location
1180
            );
1181
        }
1182
1183
        $this->assertEquals(
1184
            [
1185
                $this->generateId('location', 14),
1186
                $this->generateId('location', 44),
1187
            ],
1188
            array_map(
1189
                function (Location $location) {
1190
                    return $location->id;
1191
                },
1192
                $locations->locations
1193
            )
1194
        );
1195
    }
1196
1197
    /**
1198
     * Test for the newLocationUpdateStruct() method.