Skip to content
Permalink
Browse files

Tidy up variable names.

Variables with _ in them are confusing, try to use clearer names.
  • Loading branch information...
markstory committed May 21, 2013
1 parent 631082a commit 9cdc3927f2874af6be9e6de60e23e5d8871de02e
Showing with 7 additions and 7 deletions.
  1. +7 −7 lib/Cake/TestSuite/ControllerTestCase.php
@@ -329,11 +329,11 @@ public function generate($controller, $mocks = array()) {
), (array)$mocks);
list($plugin, $name) = pluginSplit($controller);
$_controller = $this->getMock($name . 'Controller', $mocks['methods'], array(), '', false);
$_controller->name = $name;
$controllerObj = $this->getMock($name . 'Controller', $mocks['methods'], array(), '', false);
$controllerObj->name = $name;
$request = $this->getMock('CakeRequest');
$response = $this->getMock('CakeResponse', array('_sendHeader'));
$_controller->__construct($request, $response);
$controllerObj->__construct($request, $response);
$config = ClassRegistry::config('Model');
foreach ($mocks['models'] as $model => $methods) {
@@ -363,14 +363,14 @@ public function generate($controller, $mocks = array()) {
'class' => $componentClass
));
}
$_component = $this->getMock($componentClass, $methods, array(), '', false);
$_controller->Components->set($name, $_component);
$componentObj = $this->getMock($componentClass, $methods, array(), '', false);
$controllerObj->Components->set($name, $componentObj);
}
$_controller->constructClasses();
$controllerObj->constructClasses();
$this->_dirtyController = false;
$this->controller = $_controller;
$this->controller = $controllerObj;
return $this->controller;
}

0 comments on commit 9cdc392

Please sign in to comment.
You can’t perform that action at this time.