$expected = <<<EOD Content-Type: text/html Expires: Mon, 26 Jul 1997 05:00:00 GMT Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0, max-age=0 Pragma: no-cache EOD; expect($response->headers->to('header'))->toBe($expected); }); it("adds cache headers to a specific date", function () { Monkey::patch('time', function () { return 1451001000; }); $response = new Response(); $response->cache(1451001600); $expected = <<<EOD Content-Type: text/html Expires: Fri, 25 Dec 2015 00:00:00 GMT Cache-Control: max-age=600 Pragma: no-cache EOD; expect($response->headers->to('header'))->toBe($expected); }); }); describe("->digest()", function () { it("parses digest header", function () { $headers = ['WWW-Authenticate: Digest realm="app",qop="auth",nonce="4ee1617b8756e",opaque="dd7bcee161192cb8fba765eb595eba87"']; $response = new Response(['headers' => $headers]);