| @@ 55-63 (lines=9) @@ | ||
| 52 | * @depends testCreateLocation |
|
| 53 | * @covers GET /content/locations?remoteId=<locationRemoteId> |
|
| 54 | */ |
|
| 55 | public function testRedirectLocationByRemoteId($locationHref) |
|
| 56 | { |
|
| 57 | $response = $this->sendHttpRequest( |
|
| 58 | $this->createHttpRequest('GET', '/api/ezp/v2/content/locations?remoteId=' . $this->addTestSuffix('testCreateLocation')) |
|
| 59 | ); |
|
| 60 | ||
| 61 | self::assertHttpResponseCodeEquals($response, 307); |
|
| 62 | self::assertHttpResponseHasHeader($response, 'Location', $locationHref); |
|
| 63 | } |
|
| 64 | ||
| 65 | /** |
|
| 66 | * @depends testCreateLocation |
|
| @@ 231-239 (lines=9) @@ | ||
| 228 | * @depends testCreateUser |
|
| 229 | * @covers GET /user/users?remoteId={userRemoteId} |
|
| 230 | */ |
|
| 231 | public function testLoadUserByRemoteId() |
|
| 232 | { |
|
| 233 | $remoteId = $this->addTestSuffix('testCreateUser'); |
|
| 234 | $response = $this->sendHttpRequest( |
|
| 235 | $this->createHttpRequest('GET', "/api/ezp/v2/user/users?remoteId=$remoteId") |
|
| 236 | ); |
|
| 237 | ||
| 238 | self::assertHttpResponseCodeEquals($response, 200); |
|
| 239 | } |
|
| 240 | ||
| 241 | /** |
|
| 242 | * @covers GET /user/groups |
|
| @@ 257-265 (lines=9) @@ | ||
| 254 | * @depends testCreateUserGroup |
|
| 255 | * @covers GET /user/groups?remoteId={groupRemoteId} |
|
| 256 | */ |
|
| 257 | public function testLoadUserGroupByRemoteId($groupHref) |
|
| 258 | { |
|
| 259 | $remoteId = $this->addTestSuffix('testCreateUserGroup'); |
|
| 260 | $response = $this->sendHttpRequest( |
|
| 261 | $this->createHttpRequest('GET', "/api/ezp/v2/user/groups?remoteId=$remoteId") |
|
| 262 | ); |
|
| 263 | ||
| 264 | self::assertHttpResponseCodeEquals($response, 200); |
|
| 265 | } |
|
| 266 | ||
| 267 | /** |
|
| 268 | * @covers GET /user/users/{userId}/drafts |
|
| @@ 362-376 (lines=15) @@ | ||
| 359 | * @depends testCreateDraftFromVersion |
|
| 360 | * @covers GET /content/objects/<contentId>/versions/<versionNumber>/relations |
|
| 361 | */ |
|
| 362 | public function testLoadVersionRelations($restContentVersionHref) |
|
| 363 | { |
|
| 364 | $response = $this->sendHttpRequest( |
|
| 365 | $this->createHttpRequest('GET', "$restContentVersionHref/relations") |
|
| 366 | ); |
|
| 367 | ||
| 368 | self::assertHttpResponseCodeEquals($response, 200); |
|
| 369 | ||
| 370 | $this->assertHttpResponseHasCacheTags( |
|
| 371 | $response, |
|
| 372 | [ |
|
| 373 | 'content-' . $this->extractContentIdFromHref($restContentVersionHref) |
|
| 374 | ] |
|
| 375 | ); |
|
| 376 | } |
|
| 377 | ||
| 378 | /** |
|
| 379 | * @depends testCreateDraftFromVersion |
|