diff --git a/lib/Cake/TestSuite/ControllerTestCase.php b/lib/Cake/TestSuite/ControllerTestCase.php index 4037cf378..4e365c6c8 100644 --- a/lib/Cake/TestSuite/ControllerTestCase.php +++ b/lib/Cake/TestSuite/ControllerTestCase.php @@ -363,8 +363,9 @@ abstract class ControllerTestCase extends CakeTestCase { 'class' => $componentClass )); } - $componentObj = $this->getMock($componentClass, $methods, array(), '', false); + $componentObj = $this->getMock($componentClass, $methods, array($controllerObj->Components)); $controllerObj->Components->set($name, $componentObj); + $controllerObj->Components->enable($name); } $controllerObj->constructClasses();