/** * 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; }
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'); }