Skip to content
Permalink
Browse files

Handle the case where viewPath changes.

Fixes #2537
  • Loading branch information...
markstory committed Feb 4, 2012
1 parent ee083e0 commit 437d68c60be0ad39a74e2f0751637f8235955795
Showing with 4 additions and 1 deletion.
  1. +3 −1 lib/Cake/Error/ExceptionRenderer.php
  2. +1 −0 lib/Cake/Test/Case/Error/ExceptionRendererTest.php
@@ -278,8 +278,10 @@ protected function _outputMessage($template) {
protected function _outputMessageSafe($template) {
$this->controller->layoutPath = '';
$this->controller->subDir = '';
$this->controller->helpers = array('Form', 'Html', 'Session');
$this->controller->viewPath = 'Errors/';
$this->controller->viewClass = 'View';
$this->controller->helpers = array('Form', 'Html', 'Session');
$this->controller->render($template);
$this->controller->response->type('html');
$this->controller->response->send();
@@ -686,6 +686,7 @@ public function testMissingSubdirRenderSafe() {
$this->assertEquals('', $ExceptionRenderer->controller->layoutPath);
$this->assertEquals('', $ExceptionRenderer->controller->subDir);
$this->assertEquals('View', $ExceptionRenderer->controller->viewClass);
$this->assertEquals('Errors/', $ExceptionRenderer->controller->viewPath);
}
/**

0 comments on commit 437d68c

Please sign in to comment.
You can’t perform that action at this time.