@@ 1153-1178 (lines=26) @@ | ||
1150 | * @see \eZ\Publish\API\Repository\LocationService::loadLocationChildren($location, $offset) |
|
1151 | * @depends eZ\Publish\API\Repository\Tests\LocationServiceTest::testLoadLocationChildrenWithOffset |
|
1152 | */ |
|
1153 | public function testLoadLocationChildrenDataWithOffset(LocationList $locations) |
|
1154 | { |
|
1155 | $this->assertCount(3, $locations->locations); |
|
1156 | $this->assertEquals(5, $locations->totalCount); |
|
1157 | ||
1158 | foreach ($locations->locations as $location) { |
|
1159 | $this->assertInstanceOf( |
|
1160 | '\\eZ\\Publish\\API\\Repository\\Values\\Content\\Location', |
|
1161 | $location |
|
1162 | ); |
|
1163 | } |
|
1164 | ||
1165 | $this->assertEquals( |
|
1166 | [ |
|
1167 | $this->generateId('location', 14), |
|
1168 | $this->generateId('location', 44), |
|
1169 | $this->generateId('location', 61), |
|
1170 | ], |
|
1171 | array_map( |
|
1172 | function (Location $location) { |
|
1173 | return $location->id; |
|
1174 | }, |
|
1175 | $locations->locations |
|
1176 | ) |
|
1177 | ); |
|
1178 | } |
|
1179 | ||
1180 | /** |
|
1181 | * Test for the loadLocationChildren() method. |
|
@@ 1217-1241 (lines=25) @@ | ||
1214 | * @see \eZ\Publish\API\Repository\LocationService::loadLocationChildren($location, $offset, $limit) |
|
1215 | * @depends eZ\Publish\API\Repository\Tests\LocationServiceTest::testLoadLocationChildrenWithOffsetAndLimit |
|
1216 | */ |
|
1217 | public function testLoadLocationChildrenDataWithOffsetAndLimit(LocationList $locations) |
|
1218 | { |
|
1219 | $this->assertCount(2, $locations->locations); |
|
1220 | $this->assertEquals(5, $locations->totalCount); |
|
1221 | ||
1222 | foreach ($locations->locations as $location) { |
|
1223 | $this->assertInstanceOf( |
|
1224 | '\\eZ\\Publish\\API\\Repository\\Values\\Content\\Location', |
|
1225 | $location |
|
1226 | ); |
|
1227 | } |
|
1228 | ||
1229 | $this->assertEquals( |
|
1230 | [ |
|
1231 | $this->generateId('location', 14), |
|
1232 | $this->generateId('location', 44), |
|
1233 | ], |
|
1234 | array_map( |
|
1235 | function (Location $location) { |
|
1236 | return $location->id; |
|
1237 | }, |
|
1238 | $locations->locations |
|
1239 | ) |
|
1240 | ); |
|
1241 | } |
|
1242 | ||
1243 | /** |
|
1244 | * Test for the newLocationUpdateStruct() method. |