Example #1
0
 /**
  * @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();
 }
Example #2
0
 /**
  * @expectedException \InvalidArgumentException
  */
 function testCacheMissedWithInvalidHandler()
 {
     $response = new Response();
     $response->whenCacheMissed(null);
 }