Skip to content

Commit

Permalink
Defaulting autoMock to true.
Browse files Browse the repository at this point in the history
This fixes issues with mock controllers being discarded after use.
Not always mocking controllers causes issues with using redirect().

Fixes #2200
  • Loading branch information
markstory committed Nov 6, 2011
1 parent cc0f0b4 commit 3e54ffd
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
1 change: 0 additions & 1 deletion lib/Cake/Test/Case/TestSuite/ControllerTestCaseTest.php
Expand Up @@ -503,7 +503,6 @@ public function testNoControllerReuse() {
* @return void
*/
public function testTestActionWithMultipleRedirect() {
$this->Case->autoMock = true;
$Controller = $this->Case->generate('TestsApps');

$options = array('method' => 'get');
Expand Down
2 changes: 1 addition & 1 deletion lib/Cake/TestSuite/ControllerTestCase.php
Expand Up @@ -119,7 +119,7 @@ abstract class ControllerTestCase extends CakeTestCase {
*
* @var boolean
*/
public $autoMock = false;
public $autoMock = true;

/**
* Use custom routes during tests
Expand Down

0 comments on commit 3e54ffd

Please sign in to comment.