Example #1
0
 public function testDisplay()
 {
     $view = new \Rapid\View();
     $view->setFile($this->path);
     $view->var = 'It\'s very simple web-framework!';
     $this->expectOutputString($this->expectedHtml);
     $view->display();
 }
Example #2
0
 public function process($action)
 {
     $this->init();
     $variables = (array) $this->{$action}();
     if ($this->view) {
         $this->view->setVariables($variables);
         return $this->view->render();
     }
 }