Skip to content
This repository
Browse code

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
  • Loading branch information...
commit 3e54ffd8c12b6e501a0754b0e651d22087f4da0d 1 parent cc0f0b4
Mark Story authored November 06, 2011
1  lib/Cake/Test/Case/TestSuite/ControllerTestCaseTest.php
@@ -503,7 +503,6 @@ public function testNoControllerReuse() {
503 503
  * @return void
504 504
  */
505 505
 	public function testTestActionWithMultipleRedirect() {
506  
-		$this->Case->autoMock = true;
507 506
 		$Controller = $this->Case->generate('TestsApps');
508 507
 
509 508
 		$options = array('method' => 'get');
2  lib/Cake/TestSuite/ControllerTestCase.php
@@ -119,7 +119,7 @@ public function afterRender($viewFile) {
119 119
  *
120 120
  * @var boolean
121 121
  */
122  
-	public $autoMock = false;
  122
+	public $autoMock = true;
123 123
 
124 124
 /**
125 125
  * Use custom routes during tests

0 notes on commit 3e54ffd

Please sign in to comment.
Something went wrong with that request. Please try again.