Removed unnecessary imports and ensured model import. Fixes #1453

This commit is contained in:
Jeremy Harris 2011-01-21 15:08:37 -08:00
parent 46d14c51a0
commit 68799c9828
2 changed files with 1 additions and 4 deletions

View file

@ -18,10 +18,6 @@
* @since CakePHP v 2.0 * @since CakePHP v 2.0
* @license MIT License (http://www.opensource.org/licenses/mit-license.php) * @license MIT License (http://www.opensource.org/licenses/mit-license.php)
*/ */
App::import('Controller', 'Controller', false);
App::import('Core', array('AppModel', 'Model'));
require_once TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'lib' . DS . 'reporter' . DS . 'cake_html_reporter.php';
require_once dirname(__FILE__) . DS . 'model' . DS . 'models.php';
/** /**
* AppController class * AppController class

View file

@ -276,6 +276,7 @@ class ControllerTestCase extends CakeTestCase {
if ($methods === true) { if ($methods === true) {
$methods = array(); $methods = array();
} }
ClassRegistry::init($model);
list($plugin, $name) = pluginSplit($model); list($plugin, $name) = pluginSplit($model);
$config = array_merge((array)$config, array('name' => $model)); $config = array_merge((array)$config, array('name' => $model));
$_model = $this->getMock($name, $methods, array($config)); $_model = $this->getMock($name, $methods, array($config));