From 3e54ffd8c12b6e501a0754b0e651d22087f4da0d Mon Sep 17 00:00:00 2001 From: mark_story Date: Sun, 6 Nov 2011 09:36:27 -0500 Subject: [PATCH] Defaulting autoMock to true. This fixes issues with mock controllers being discarded after use. Not always mocking controllers causes issues with using redirect(). Fixes #2200 --- lib/Cake/Test/Case/TestSuite/ControllerTestCaseTest.php | 1 - lib/Cake/TestSuite/ControllerTestCase.php | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/Cake/Test/Case/TestSuite/ControllerTestCaseTest.php b/lib/Cake/Test/Case/TestSuite/ControllerTestCaseTest.php index 2fa946275..af9d932dd 100644 --- a/lib/Cake/Test/Case/TestSuite/ControllerTestCaseTest.php +++ b/lib/Cake/Test/Case/TestSuite/ControllerTestCaseTest.php @@ -503,7 +503,6 @@ class ControllerTestCaseTest extends CakeTestCase { * @return void */ public function testTestActionWithMultipleRedirect() { - $this->Case->autoMock = true; $Controller = $this->Case->generate('TestsApps'); $options = array('method' => 'get'); diff --git a/lib/Cake/TestSuite/ControllerTestCase.php b/lib/Cake/TestSuite/ControllerTestCase.php index c293e6acf..1557958fa 100644 --- a/lib/Cake/TestSuite/ControllerTestCase.php +++ b/lib/Cake/TestSuite/ControllerTestCase.php @@ -119,7 +119,7 @@ abstract class ControllerTestCase extends CakeTestCase { * * @var boolean */ - public $autoMock = false; + public $autoMock = true; /** * Use custom routes during tests