From b02155e7663e932f886f91b3aaf2d6ec9dc81326 Mon Sep 17 00:00:00 2001 From: mark_story Date: Sat, 22 Oct 2011 23:27:04 -0400 Subject: [PATCH] Remove tests, that interact with RedirectRoute. RedirectRoute now has exit() in it. This makes hitting those routes in testing dangerous. --- .../Test/Case/TestSuite/ControllerTestCaseTest.php | 10 ---------- lib/Cake/Test/test_app/Config/routes.php | 2 -- 2 files changed, 12 deletions(-) diff --git a/lib/Cake/Test/Case/TestSuite/ControllerTestCaseTest.php b/lib/Cake/Test/Case/TestSuite/ControllerTestCaseTest.php index 0505b795cce..c5007f9ab2c 100644 --- a/lib/Cake/Test/Case/TestSuite/ControllerTestCaseTest.php +++ b/lib/Cake/Test/Case/TestSuite/ControllerTestCaseTest.php @@ -298,16 +298,6 @@ public function testUseRoutes() { include CAKE . 'Test' . DS . 'test_app' . DS . 'Config' . DS . 'routes.php'; $result = $this->Case->testAction('/some_alias'); $this->assertEquals($result, 5); - - include CAKE . 'Test' . DS . 'test_app' . DS . 'Config' . DS . 'routes.php'; - $this->Case->testAction('/redirect_me_now'); - $result = $this->Case->headers['Location']; - $this->assertEquals($result, 'http://cakephp.org'); - - include CAKE . 'Test' . DS . 'test_app' . DS . 'Config' . DS . 'routes.php'; - $this->Case->testAction('/redirect_me'); - $result = $this->Case->headers['Location']; - $this->assertEquals($result, Router::url(array('controller' => 'tests_apps', 'action' => 'some_method'), true)); } /** diff --git a/lib/Cake/Test/test_app/Config/routes.php b/lib/Cake/Test/test_app/Config/routes.php index 2ea969c79d4..5145e31b8d9 100644 --- a/lib/Cake/Test/test_app/Config/routes.php +++ b/lib/Cake/Test/test_app/Config/routes.php @@ -21,5 +21,3 @@ Router::parseExtensions('json'); Router::connect('/some_alias', array('controller' => 'tests_apps', 'action' => 'some_method')); -Router::redirect('/redirect_me_now', 'http://cakephp.org'); -Router::redirect('/redirect_me', array('controller' => 'tests_apps', 'action' => 'some_method')); \ No newline at end of file