public function testStatusCodeGetternAndSetter() { $this->res->setStatusCode(Status::NOT_FOUND); $this->assertEquals(Status::NOT_FOUND, $this->res->getStatusCode()); }
/** * get a static file * @param array $route * @param Response $res * @return boolean, action found and called */ private function runFileRequest(array $route, Response $res) { $file = $route['file']; $base = $route['base']; $frmt = $route['format']; $path = $base . DIRECTORY_SEPARATOR . $file . ($frmt ? ".{$frmt}" : ''); $res->setContent($this->renderer->render($this, $path)); return true; }