ソースを参照

Fixing more failing tests

Jose Lorenzo Rodriguez 11 年 前
コミット
76381259d3

+ 2 - 3
src/Error/ExceptionRenderer.php

@@ -19,7 +19,6 @@ use Cake\Controller\ErrorController;
 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 @@ class ExceptionRenderer {
 		$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 @@ class ExceptionRenderer {
  * @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';

+ 1 - 1
tests/TestCase/Controller/Component/SecurityComponentTest.php

@@ -166,7 +166,7 @@ class SecurityComponentTest extends TestCase {
  * 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() {

+ 1 - 1
tests/TestCase/Controller/PagesControllerTest.php

@@ -47,7 +47,7 @@ class PagesControllerTest extends TestCase {
 /**
  * Test that missing view renders 404 page in production
  *
- * @expectedException \Cake\Error\NotFoundException
+ * @expectedException \Cake\Network\Exception\NotFoundException
  * @expectedExceptionCode 404
  * @return void
  */

+ 1 - 1
tests/TestCase/Error/DebuggerTest.php

@@ -220,7 +220,7 @@ class DebuggerTest extends TestCase {
 /**
  * Test that choosing a non-existent format causes an exception
  *
- * @expectedException \Cake\Core\Exception\Exception
+ * @expectedException InvalidArgumentException
  * @return void
  */
 	public function testOutputAsException() {