Esempio n. 1
0
 public function testStatusCodeGetternAndSetter()
 {
     $this->res->setStatusCode(Status::NOT_FOUND);
     $this->assertEquals(Status::NOT_FOUND, $this->res->getStatusCode());
 }
Esempio n. 2
0
 /**
  * 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;
 }