Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Remove ClassRegistry references in ControllerTestCase.

Refs #2871
  • Loading branch information...
commit 8a0711266f7b1e24f63540b788946b99c58619e4 1 parent 371c391
Mark Story markstory authored
Showing with 1 addition and 4 deletions.
  1. +1 −4 src/TestSuite/ControllerTestCase.php
5 src/TestSuite/ControllerTestCase.php
View
@@ -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) {
Please sign in to comment.
Something went wrong with that request. Please try again.