Browse Source

Set components on the controller in ControllerTestCase.

Because we aren't re-calling constructClasses() anymore, we need to set
the mocked components onto the controller in addition to having set them
in the registry.
mark_story 11 years ago
parent
commit
059bdc7b09
1 changed files with 1 additions and 2 deletions
  1. 1 2
      src/TestSuite/ControllerTestCase.php

+ 1 - 2
src/TestSuite/ControllerTestCase.php

@@ -416,11 +416,10 @@ abstract class ControllerTestCase extends TestCase {
 			$config = isset($controller->components[$component]) ? $controller->components[$component] : array();
 			$component = $this->getMock($componentClass, $methods, array($registry, $config));
 			$registry->set($name, $component);
+			$controller->{$name} = $component;
 		}
 
-		$controller->constructClasses();
 		$this->_dirtyController = false;
-
 		$this->controller = $controller;
 		return $this->controller;
 	}