Skip to content

Commit

Permalink
Fixing more failing tests
Browse files Browse the repository at this point in the history
  • Loading branch information
lorenzo committed Aug 30, 2014
1 parent 512d385 commit 7638125
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 6 deletions.
5 changes: 2 additions & 3 deletions src/Error/ExceptionRenderer.php
Expand Up @@ -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;
Expand Down Expand Up @@ -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');
Expand All @@ -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';
Expand Down
Expand Up @@ -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() {
Expand Down
2 changes: 1 addition & 1 deletion tests/TestCase/Controller/PagesControllerTest.php
Expand Up @@ -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
*/
Expand Down
2 changes: 1 addition & 1 deletion tests/TestCase/Error/DebuggerTest.php
Expand Up @@ -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() {
Expand Down

0 comments on commit 7638125

Please sign in to comment.