Laravel\Lumen\Testing\Concerns\MakesHttpRequests::seeHeader PHP Method

seeHeader() protected method

Asserts that the response contains the given header and equals the optional value.
protected seeHeader ( string $headerName, mixed $value = null )
$headerName string
$value mixed
    protected function seeHeader($headerName, $value = null)
    {
        $headers = $this->response->headers;
        $this->assertTrue($headers->has($headerName), "Header [{$headerName}] not present on response.");
        if (!is_null($value)) {
            $this->assertEquals($headers->get($headerName), $value, "Header [{$headerName}] was found, but value [{$headers->get($headerName)}] does not match [{$value}].");
        }
        return $this;
    }