Skip to content

Commit

Permalink
Merge pull request #2874 from cakephp/3.0-no-classregistry
Browse files Browse the repository at this point in the history
Remove ClassRegistry references in ControllerTestCase.
  • Loading branch information
lorenzo committed Feb 20, 2014
2 parents 09a5b11 + 8a07112 commit 74074b7
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/TestSuite/ControllerTestCase.php
Expand Up @@ -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;

Expand Down Expand Up @@ -317,7 +316,6 @@ public function generate($controller, $mocks = array()) {
'plugin' => $plugin
));
}
ClassRegistry::flush();

$mocks = array_merge_recursive(array(
'methods' => array('_stop'),
Expand All @@ -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;
Expand All @@ -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) {
Expand Down

0 comments on commit 74074b7

Please sign in to comment.