function testCacheHitWithSameModificationTime() { $this->response->setHeader("Last-Modified", "Sun, 25 Aug 2013 18:33:31 GMT"); $this->request->mock(array("HTTP_IF_MODIFIED_SINCE" => "Sun, 25 Aug 2013 18:33:31 GMT")); $this->send(); $this->assertEquals(304, $this->response->getStatus()); }
/** * Responds to the client to confirm method not allowed. * * @param \stdClass $match * @return void */ protected function routeToNotAllowed($match) { $status = $this->request->getMethod() === "OPTIONS" ? 200 : 405; $this->response->setHeader("Allow", join(", ", $match->allowed)); $this->response->setStatus($status); }