| @@ 90-98 (lines=9) @@ | ||
| 87 | * @depends testPublishContent |
|
| 88 | * Covers GET /content/objects?remoteId=<remoteId> |
|
| 89 | */ |
|
| 90 | public function testRedirectContent($restContentHref) |
|
| 91 | { |
|
| 92 | $response = $this->sendHttpRequest( |
|
| 93 | $this->createHttpRequest('GET', '/api/ezp/v2/content/objects?remoteId=' . $this->addTestSuffix('testCreateContent')) |
|
| 94 | ); |
|
| 95 | ||
| 96 | self::assertHttpResponseCodeEquals($response, 307); |
|
| 97 | self::assertEquals($response->getHeader('Location')[0], $restContentHref); |
|
| 98 | } |
|
| 99 | ||
| 100 | /** |
|
| 101 | * @depends testPublishContent |
|
| @@ 56-64 (lines=9) @@ | ||
| 53 | * @depends testCreateLocation |
|
| 54 | * Covers GET /content/locations?remoteId=<locationRemoteId> |
|
| 55 | */ |
|
| 56 | public function testRedirectLocationByRemoteId($locationHref) |
|
| 57 | { |
|
| 58 | $response = $this->sendHttpRequest( |
|
| 59 | $this->createHttpRequest('GET', '/api/ezp/v2/content/locations?remoteId=' . $this->addTestSuffix('testCreateLocation')) |
|
| 60 | ); |
|
| 61 | ||
| 62 | self::assertHttpResponseCodeEquals($response, 307); |
|
| 63 | self::assertHttpResponseHasHeader($response, 'Location', $locationHref); |
|
| 64 | } |
|
| 65 | ||
| 66 | /** |
|
| 67 | * @depends testCreateLocation |
|
| @@ 227-235 (lines=9) @@ | ||
| 224 | * @depends testCreateUser |
|
| 225 | * Covers GET /user/users?remoteId={userRemoteId} |
|
| 226 | */ |
|
| 227 | public function testLoadUserByRemoteId() |
|
| 228 | { |
|
| 229 | $remoteId = $this->addTestSuffix('testCreateUser'); |
|
| 230 | $response = $this->sendHttpRequest( |
|
| 231 | $this->createHttpRequest('GET', "/api/ezp/v2/user/users?remoteId=$remoteId") |
|
| 232 | ); |
|
| 233 | ||
| 234 | self::assertHttpResponseCodeEquals($response, 200); |
|
| 235 | } |
|
| 236 | ||
| 237 | /** |
|
| 238 | * Covers GET /user/groups. |
|
| @@ 253-261 (lines=9) @@ | ||
| 250 | * @depends testCreateUserGroup |
|
| 251 | * Covers GET /user/groups?remoteId={groupRemoteId} |
|
| 252 | */ |
|
| 253 | public function testLoadUserGroupByRemoteId($groupHref) |
|
| 254 | { |
|
| 255 | $remoteId = $this->addTestSuffix('testCreateUserGroup'); |
|
| 256 | $response = $this->sendHttpRequest( |
|
| 257 | $this->createHttpRequest('GET', "/api/ezp/v2/user/groups?remoteId=$remoteId") |
|
| 258 | ); |
|
| 259 | ||
| 260 | self::assertHttpResponseCodeEquals($response, 200); |
|
| 261 | } |
|
| 262 | ||
| 263 | /** |
|
| 264 | * Covers GET /user/users/{userId}/drafts. |
|