From 8cce38692a1c28808c19cfa5e8514222124b9985 Mon Sep 17 00:00:00 2001 From: Mark Story Date: Fri, 23 Apr 2010 20:42:53 -0400 Subject: [PATCH] Simplifying route configuration failure test case. --- cake/tests/cases/libs/router.test.php | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/cake/tests/cases/libs/router.test.php b/cake/tests/cases/libs/router.test.php index 2157f233a..074ec524e 100644 --- a/cake/tests/cases/libs/router.test.php +++ b/cake/tests/cases/libs/router.test.php @@ -1916,12 +1916,8 @@ class RouterTest extends CakeTestCase { * @return void */ function testCustomRouteException() { - try { - Router::connect('/:controller', array(), array('routeClass' => 'Object')); - $this->$this->assertFalse(true, 'No exception thrown when an invalid class was used.'); - } catch (Exception $e) { - $this->assertTrue(true, 'Exception correctly thrown'); - } + $this->expectException(); + Router::connect('/:controller', array(), array('routeClass' => 'Object')); } /**