don't check HTTP header when 304 Not Modified
This commit is contained in:
parent
8e040301de
commit
9198acc99e
|
@ -39,16 +39,18 @@ abstract class AbstractAPITest extends TestCase {
|
||||||
string $contentTypeExp = 'application/json; charset=utf-8'
|
string $contentTypeExp = 'application/json; charset=utf-8'
|
||||||
) {
|
) {
|
||||||
$this->assertEquals($statusExp, $response->getStatusCode(), $message.': Response status code');
|
$this->assertEquals($statusExp, $response->getStatusCode(), $message.': Response status code');
|
||||||
$this->assertTrue(
|
if ($statusExp !== 304) {
|
||||||
$response->hasHeader('Content-Type'),
|
$this->assertTrue(
|
||||||
$message.': Response has content-type header'
|
$response->hasHeader('Content-Type'),
|
||||||
);
|
$message.': Response has content-type header'
|
||||||
$this->assertEquals(
|
);
|
||||||
$contentTypeExp,
|
$this->assertEquals(
|
||||||
$response->getHeaderLine('Content-Type'),
|
$contentTypeExp,
|
||||||
$message.': Response content type'
|
$response->getHeaderLine('Content-Type'),
|
||||||
);
|
$message.': Response content type'
|
||||||
if ($statusExp !== 401) {
|
);
|
||||||
|
}
|
||||||
|
if ($statusExp !== 401 && $statusExp !== 304) {
|
||||||
$this->assertTrue(
|
$this->assertTrue(
|
||||||
$response->hasHeader('X-Notes-API-Versions'),
|
$response->hasHeader('X-Notes-API-Versions'),
|
||||||
$message.': Response has Notes-API-Versions header'
|
$message.': Response has Notes-API-Versions header'
|
||||||
|
|
Loading…
Reference in New Issue