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
This commit is contained in:
mark_story 2011-11-06 09:36:27 -05:00
parent cc0f0b4e55
commit 3e54ffd8c1
2 changed files with 1 additions and 2 deletions

View file

@ -503,7 +503,6 @@ class ControllerTestCaseTest extends CakeTestCase {
* @return void * @return void
*/ */
public function testTestActionWithMultipleRedirect() { public function testTestActionWithMultipleRedirect() {
$this->Case->autoMock = true;
$Controller = $this->Case->generate('TestsApps'); $Controller = $this->Case->generate('TestsApps');
$options = array('method' => 'get'); $options = array('method' => 'get');

View file

@ -119,7 +119,7 @@ abstract class ControllerTestCase extends CakeTestCase {
* *
* @var boolean * @var boolean
*/ */
public $autoMock = false; public $autoMock = true;
/** /**
* Use custom routes during tests * Use custom routes during tests