public function testStatusGetter() { $response = new Response(); $this->assertInternalType('object', $response->status()); $this->assertTrue($response->status() instanceof HttpStatus); }
/** * Fonction par default de gestion/retranscription d'erreur * @param Exception $error * @param \Router\Response $response * @return string */ public function error(\Exception $error, Router\Response $response) { $response->type("text/html", "utf-8"); $response->status($error->getCode() ?: 500); return '<html><head></head><body><pre>' . (string) $error . '</pre></body></html>'; }