protected function assertHttpResponseHasHeader(HttpResponse $response, $header, $expectedValue = null)
{
$headerValue = $response->getHeader($header);
self::assertNotNull($headerValue, "Failed asserting that response has a {$header} header");
if ($expectedValue !== null) {
self::assertEquals($expectedValue, $headerValue);
}
}