Example #1
0
 /**
  * Called at the end of the process.
  * @return boolean
  */
 public final function finalise()
 {
     if ($this->view->isEnabled()) {
         $this->view->setResponse($this->response);
         $this->view->render();
     }
     return true;
 }
Example #2
0
 public function testRenderInvalidLayout()
 {
     $this->view->setResponse(new Response());
     $this->view->name = 'abc';
     try {
         $this->view->setLayout('nosuchlayout');
         $this->view->render('namae', 'UserTest', 'TestPackage');
     } catch (\Exception $e) {
         $this->assertInstanceOf('\\Phavour\\Runnable\\View\\Exception\\LayoutFileNotFoundException', $e);
         $this->assertContains('Invalid layout file path', $e->getMessage());
         return;
     }
     $this->fail('expected exception');
 }