diff --git a/src/Error/ExceptionRenderer.php b/src/Error/ExceptionRenderer.php index a485af80a02..6b3ebc8d5b8 100644 --- a/src/Error/ExceptionRenderer.php +++ b/src/Error/ExceptionRenderer.php @@ -25,7 +25,7 @@ use Cake\Network\Response; use Cake\Routing\Router; use Cake\Utility\Inflector; -use Cake\View\Exception\MissingViewException; +use Cake\View\Exception\MissingTemplateException; use Exception; /** @@ -270,7 +270,7 @@ protected function _outputMessage($template) { $event = new Event('Controller.shutdown', $this->controller); $this->controller->afterFilter($event); return $this->controller->response; - } catch (MissingViewException $e) { + } catch (MissingTemplateException $e) { $attributes = $e->getAttributes(); if (isset($attributes['file']) && strpos($attributes['file'], 'error500') !== false) { return $this->_outputMessageSafe('error500'); diff --git a/src/View/Cell.php b/src/View/Cell.php index 3c87613a00a..25220ae163a 100644 --- a/src/View/Cell.php +++ b/src/View/Cell.php @@ -21,7 +21,7 @@ use Cake\Network\Response; use Cake\Utility\Inflector; use Cake\View\Exception\MissingCellViewException; -use Cake\View\Exception\MissingViewException; +use Cake\View\Exception\MissingTemplateException; use Cake\View\ViewVarsTrait; /** @@ -143,7 +143,7 @@ public function __construct(Request $request = null, Response $response = null, * @param string $template Custom template name to render. If not provided (null), the last * value will be used. This value is automatically set by `CellTrait::cell()`. * @return void - * @throws \Cake\View\Exception\MissingCellViewException When a MissingViewException is raised during rendering. + * @throws \Cake\View\Exception\MissingCellViewException When a MissingTemplateException is raised during rendering. */ public function render($template = null) { if ($template !== null && strpos($template, '/') === false) { @@ -164,7 +164,7 @@ public function render($template = null) { try { return $this->View->render($template); - } catch (MissingViewException $e) { + } catch (MissingTemplateException $e) { throw new MissingCellViewException(['file' => $template, 'name' => $name]); } } diff --git a/tests/TestCase/Controller/PagesControllerTest.php b/tests/TestCase/Controller/PagesControllerTest.php index a2e7c061595..5da5ed94d4a 100644 --- a/tests/TestCase/Controller/PagesControllerTest.php +++ b/tests/TestCase/Controller/PagesControllerTest.php @@ -21,7 +21,7 @@ use Cake\Network\Request; use Cake\Network\Response; use Cake\TestSuite\TestCase; -use Cake\View\Exception\MissingViewException; +use Cake\View\Exception\MissingTemplateException; use TestApp\Controller\PagesController; /** @@ -60,7 +60,7 @@ public function testMissingView() { /** * Test that missing view in debug mode renders missing_view error page * - * @expectedException \Cake\View\Exception\MissingViewException + * @expectedException \Cake\View\Exception\MissingTemplateException * @expectedExceptionCode 500 * @return void */ diff --git a/tests/TestCase/Error/ExceptionRendererTest.php b/tests/TestCase/Error/ExceptionRendererTest.php index 748e121f55c..667059ef3f1 100644 --- a/tests/TestCase/Error/ExceptionRendererTest.php +++ b/tests/TestCase/Error/ExceptionRendererTest.php @@ -38,7 +38,7 @@ use Cake\TestSuite\TestCase; use Cake\View\Exception\MissingHelperException; use Cake\View\Exception\MissingLayoutException; -use Cake\View\Exception\MissingViewException; +use Cake\View\Exception\MissingTemplateException; /** * BlueberryComponent class @@ -489,7 +489,7 @@ public static function exceptionProvider() { 404 ), array( - new MissingViewException(array('file' => '/posts/about.ctp')), + new MissingTemplateException(array('file' => '/posts/about.ctp')), array( "/posts\/about.ctp/" ), diff --git a/tests/TestCase/Network/Email/EmailTest.php b/tests/TestCase/Network/Email/EmailTest.php index 7608f214230..4840474a540 100644 --- a/tests/TestCase/Network/Email/EmailTest.php +++ b/tests/TestCase/Network/Email/EmailTest.php @@ -22,7 +22,7 @@ use Cake\Network\Email\DebugTransport; use Cake\Network\Email\Email; use Cake\TestSuite\TestCase; -use Cake\View\Exception\MissingViewException; +use Cake\View\Exception\MissingTemplateException; /** * Help to test Email @@ -1644,7 +1644,7 @@ public function testSendRenderPlugin() { $this->assertContains('Here is your value: 12345', $result['message']); $this->assertContains('This email was sent using the TestPlugin.', $result['message']); - $this->setExpectedException('Cake\View\Exception\MissingViewException'); + $this->setExpectedException('Cake\View\Exception\MissingTemplateException'); $this->CakeEmail->template('test_plugin_tpl', 'plug_default')->send(); } diff --git a/tests/test_app/TestApp/Controller/PagesController.php b/tests/test_app/TestApp/Controller/PagesController.php index bffdf7212c5..be8371eb269 100644 --- a/tests/test_app/TestApp/Controller/PagesController.php +++ b/tests/test_app/TestApp/Controller/PagesController.php @@ -21,7 +21,7 @@ use Cake\Core\Configure; use Cake\Network\Exception\NotFoundException; use Cake\Utility\Inflector; -use Cake\View\Exception\MissingViewException; +use Cake\View\Exception\MissingTemplateException; /** * Static content controller @@ -52,7 +52,7 @@ class PagesController extends AppController { * @param mixed What page to display * @return void * @throws Cake\Network\Exception\NotFoundException When the view file could not be found - * or Cake\View\Exception\MissingViewException in debug mode. + * or Cake\View\Exception\MissingTemplateException in debug mode. */ public function display() { $path = func_get_args(); @@ -80,7 +80,7 @@ public function display() { try { $this->render(implode('/', $path)); - } catch (MissingViewException $e) { + } catch (MissingTemplateException $e) { if (Configure::read('debug')) { throw $e; }