/** * @expectedException \ErrorException */ function testCacheMissWithNewerModification() { $this->response->setHeader("Last-Modified", "Sun, 25 Aug 2013 18:33:31 GMT"); $this->response->whenCacheMissed(function () { throw new \ErrorException(); }); $this->request->mock(array("HTTP_IF_MODIFIED_SINCE" => "Sun, 25 Aug 2013 18:33:30 GMT")); $this->sender->send(); }
/** * @expectedException \InvalidArgumentException */ function testCacheMissedWithInvalidHandler() { $response = new Response(); $response->whenCacheMissed(null); }