From c37c641b4a476c668e9ff9a2c5cdc89d534bc180 Mon Sep 17 00:00:00 2001 From: mark_story Date: Mon, 18 Jul 2011 07:33:16 -0400 Subject: [PATCH] Fixing failing tests because of core routes not being loaded. --- lib/Cake/Test/Case/TestSuite/ControllerTestCaseTest.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/Cake/Test/Case/TestSuite/ControllerTestCaseTest.php b/lib/Cake/Test/Case/TestSuite/ControllerTestCaseTest.php index c0403141b..ad20fbaa7 100644 --- a/lib/Cake/Test/Case/TestSuite/ControllerTestCaseTest.php +++ b/lib/Cake/Test/Case/TestSuite/ControllerTestCaseTest.php @@ -273,7 +273,9 @@ class ControllerTestCaseTest extends CakeTestCase { * Tests using loaded routes during tests */ public function testUseRoutes() { + Router::connect('/:controller/:action/*'); include CAKE . 'Test' . DS . 'test_app' . DS . 'Config' . DS . 'routes.php'; + $controller = $this->Case->generate('TestsApps'); $controller->Components->load('RequestHandler'); $result = $this->Case->testAction('/tests_apps/index.json', array('return' => 'view')); @@ -302,6 +304,7 @@ class ControllerTestCaseTest extends CakeTestCase { * @expectedException MissingActionException */ public function testSkipRoutes() { + Router::connect('/:controller/:action/*'); include CAKE . 'Test' . DS . 'test_app' . DS . 'Config' . DS . 'routes.php'; $this->Case->loadRoutes = false;