From 8a0711266f7b1e24f63540b788946b99c58619e4 Mon Sep 17 00:00:00 2001 From: mark_story Date: Thu, 20 Feb 2014 10:01:15 -0500 Subject: [PATCH] Remove ClassRegistry references in ControllerTestCase. Refs #2871 --- src/TestSuite/ControllerTestCase.php | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/TestSuite/ControllerTestCase.php b/src/TestSuite/ControllerTestCase.php index 9cbe13e0d2c..a59aed7d0a4 100644 --- a/src/TestSuite/ControllerTestCase.php +++ b/src/TestSuite/ControllerTestCase.php @@ -21,7 +21,6 @@ use Cake\Event\Event; use Cake\Routing\Dispatcher; use Cake\Routing\Router; -use Cake\Utility\ClassRegistry; use Cake\Utility\Inflector; use Cake\View\Helper; @@ -317,7 +316,6 @@ public function generate($controller, $mocks = array()) { 'plugin' => $plugin )); } - ClassRegistry::flush(); $mocks = array_merge_recursive(array( 'methods' => array('_stop'), @@ -336,7 +334,6 @@ public function generate($controller, $mocks = array()) { $controller->name = substr($controllerName, 0, -10); $controller->Components->setController($controllerObj); - $config = ClassRegistry::config('Model'); foreach ($mocks['models'] as $model => $methods) { if (is_string($methods)) { $model = $methods; @@ -345,7 +342,7 @@ public function generate($controller, $mocks = array()) { if ($methods === true) { $methods = array(); } - $this->getMockForModel($model, $methods, $config); + $this->getMockForModel($model, $methods); } foreach ($mocks['components'] as $component => $methods) {