From 76381259d34ac40c4cc90e4e3b85d4076392944b Mon Sep 17 00:00:00 2001 From: Jose Lorenzo Rodriguez Date: Sat, 30 Aug 2014 16:04:59 +0200 Subject: [PATCH] Fixing more failing tests --- src/Error/ExceptionRenderer.php | 5 ++--- .../TestCase/Controller/Component/SecurityComponentTest.php | 2 +- tests/TestCase/Controller/PagesControllerTest.php | 2 +- tests/TestCase/Error/DebuggerTest.php | 2 +- 4 files changed, 5 insertions(+), 6 deletions(-) diff --git a/src/Error/ExceptionRenderer.php b/src/Error/ExceptionRenderer.php index c64f7d95dbb..4f85268f03b 100644 --- a/src/Error/ExceptionRenderer.php +++ b/src/Error/ExceptionRenderer.php @@ -19,7 +19,6 @@ use Cake\Core\Configure; use Cake\Core\Exception\Exception as CakeException; use Cake\Core\Exception\MissingPluginException; -use Cake\Error; use Cake\Event\Event; use Cake\Network\Exception\HttpException; use Cake\Network\Request; @@ -196,7 +195,7 @@ protected function _message(\Exception $exception, $code) { $message = $this->error->getMessage(); if (!Configure::read('debug') && - !($exception instanceof Error\HttpException) + !($exception instanceof HttpException) ) { if ($code < 500) { $message = __d('cake', 'Not Found'); @@ -217,7 +216,7 @@ protected function _message(\Exception $exception, $code) { * @return string Template name */ protected function _template(\Exception $exception, $method, $code) { - $isHttpException = $exception instanceof Error\HttpException; + $isHttpException = $exception instanceof HttpException; if (!Configure::read('debug') && !$isHttpException) { $template = 'error500'; diff --git a/tests/TestCase/Controller/Component/SecurityComponentTest.php b/tests/TestCase/Controller/Component/SecurityComponentTest.php index 730aae9a9d4..c7fd0f422bf 100644 --- a/tests/TestCase/Controller/Component/SecurityComponentTest.php +++ b/tests/TestCase/Controller/Component/SecurityComponentTest.php @@ -166,7 +166,7 @@ public function tearDown() { * Test that requests are still blackholed when controller has incorrect * visibility keyword in the blackhole callback * - * @expectedException \Cake\Error\BadRequestException + * @expectedException \Cake\Network\Exception\BadRequestException * @return void */ public function testBlackholeWithBrokenCallback() { diff --git a/tests/TestCase/Controller/PagesControllerTest.php b/tests/TestCase/Controller/PagesControllerTest.php index 5f0daa9aafd..853b367559f 100644 --- a/tests/TestCase/Controller/PagesControllerTest.php +++ b/tests/TestCase/Controller/PagesControllerTest.php @@ -47,7 +47,7 @@ public function testDisplay() { /** * Test that missing view renders 404 page in production * - * @expectedException \Cake\Error\NotFoundException + * @expectedException \Cake\Network\Exception\NotFoundException * @expectedExceptionCode 404 * @return void */ diff --git a/tests/TestCase/Error/DebuggerTest.php b/tests/TestCase/Error/DebuggerTest.php index 00af2c349a0..6079df52bf2 100644 --- a/tests/TestCase/Error/DebuggerTest.php +++ b/tests/TestCase/Error/DebuggerTest.php @@ -220,7 +220,7 @@ public function testOutputAs() { /** * Test that choosing a non-existent format causes an exception * - * @expectedException \Cake\Core\Exception\Exception + * @expectedException InvalidArgumentException * @return void */ public function testOutputAsException() {