From 68799c98288b2794825d3f00d363cfeeb00739df Mon Sep 17 00:00:00 2001 From: Jeremy Harris Date: Fri, 21 Jan 2011 15:08:37 -0800 Subject: [PATCH] Removed unnecessary imports and ensured model import. Fixes #1453 --- cake/tests/cases/libs/controller_test_case.test.php | 4 ---- cake/tests/lib/controller_test_case.php | 1 + 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/cake/tests/cases/libs/controller_test_case.test.php b/cake/tests/cases/libs/controller_test_case.test.php index f2c1a09a4..6d4812937 100644 --- a/cake/tests/cases/libs/controller_test_case.test.php +++ b/cake/tests/cases/libs/controller_test_case.test.php @@ -18,10 +18,6 @@ * @since CakePHP v 2.0 * @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 diff --git a/cake/tests/lib/controller_test_case.php b/cake/tests/lib/controller_test_case.php index 2cd9be5f7..217463ecf 100644 --- a/cake/tests/lib/controller_test_case.php +++ b/cake/tests/lib/controller_test_case.php @@ -276,6 +276,7 @@ class ControllerTestCase extends CakeTestCase { if ($methods === true) { $methods = array(); } + ClassRegistry::init($model); list($plugin, $name) = pluginSplit($model); $config = array_merge((array)$config, array('name' => $model)); $_model = $this->getMock($name, $methods, array($config));