function testCacheControlRespected() { $this->request->mock(); $this->response->html("Hello"); $this->response->getCacheControl()->makePublic(); $this->assertEquals("Hello", $this->send()); $expected = array("HTTP/1.1 200 OK", "Content-Type: text/html", "Date: " . $this->response->getHeader("Date"), "Cache-Control: public", "Content-Length: 5"); $this->assertEquals($expected, HeaderStack::stack()); }
function testGetCacheControl() { $response = new Response(); $this->assertInstanceOf("Wilson\\Http\\CacheControl", $response->getCacheControl()); }