| @@ 254-270 (lines=17) @@ | ||
| 251 | * @depends testCreateContentType |
|
| 252 | * @covers GET /content/types/<contentTypeId> |
|
| 253 | */ |
|
| 254 | public function testLoadContentType($contentTypeHref) |
|
| 255 | { |
|
| 256 | $response = $this->sendHttpRequest( |
|
| 257 | $this->createHttpRequest('GET', $contentTypeHref) |
|
| 258 | ); |
|
| 259 | ||
| 260 | self::assertHttpResponseCodeEquals($response, 200); |
|
| 261 | ||
| 262 | $contentType = $this->parseContentTypeFromResponse($response); |
|
| 263 | $this->assertHttpResponseHasCacheTags( |
|
| 264 | $response, |
|
| 265 | [ |
|
| 266 | 'content-type' => $contentType->id, |
|
| 267 | 'content-type-group' => $contentType->contentTypeGroups[0]->id, |
|
| 268 | ] |
|
| 269 | ); |
|
| 270 | } |
|
| 271 | ||
| 272 | /** |
|
| 273 | * @depends testCreateContentType |
|
| @@ 125-140 (lines=16) @@ | ||
| 122 | * @depends testCreateUrlAlias |
|
| 123 | * @covers GET /content/urlaliases/{urlAliasId} |
|
| 124 | */ |
|
| 125 | public function testLoadURLAlias($urlAliasHref) |
|
| 126 | { |
|
| 127 | $response = $this->sendHttpRequest( |
|
| 128 | $this->createHttpRequest('GET', $urlAliasHref, '', 'UrlAlias+json') |
|
| 129 | ); |
|
| 130 | ||
| 131 | self::assertHttpResponseCodeEquals($response, 200); |
|
| 132 | ||
| 133 | $urlAlias = $this->parseUrlAliasFromResponse($response); |
|
| 134 | $this->assertHttpResponseHasCacheTags( |
|
| 135 | $response, |
|
| 136 | [ |
|
| 137 | 'location-' . $urlAlias->destination->id, |
|
| 138 | ] |
|
| 139 | ); |
|
| 140 | } |
|
| 141 | ||
| 142 | /** |
|
| 143 | * @depends testCreateFolder |
|