diff --git a/lib/Cake/Utility/ClassRegistry.php b/lib/Cake/Utility/ClassRegistry.php index 8a6f83bb3..c0d4e6685 100644 --- a/lib/Cake/Utility/ClassRegistry.php +++ b/lib/Cake/Utility/ClassRegistry.php @@ -134,6 +134,7 @@ class ClassRegistry { App::uses('Model', 'Model'); App::uses('AppModel', 'Model'); + App::uses($plugin . 'AppModel', $pluginPath . $type); App::uses($class, $pluginPath . $type); if (class_exists($class)) { ${$class} = new $class($settings); diff --git a/lib/Cake/tests/cases/libs/controller/controller.test.php b/lib/Cake/tests/cases/libs/controller/controller.test.php index 5fbe858a0..4e743ef57 100644 --- a/lib/Cake/tests/cases/libs/controller/controller.test.php +++ b/lib/Cake/tests/cases/libs/controller/controller.test.php @@ -17,6 +17,7 @@ * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ App::uses('Controller', 'Controller'); +App::uses('Router', 'Routing'); App::uses('CakeRequest', 'Network'); App::uses('CakeResponse', 'Network'); App::uses('SecurityComponent', 'Controller/Component'); @@ -438,9 +439,10 @@ class ControllerTest extends CakeTestCase { function testLoadModelInPlugins() { App::build(array( 'plugins' => array(LIBS . 'tests' . DS . 'test_app' . DS . 'plugins' . DS), - 'controllers' => array(LIBS . 'tests' . DS . 'test_app' . DS . 'controllers' . DS), - 'models' => array(LIBS . 'tests' . DS . 'test_app' . DS . 'models' . DS) + 'Controller' => array(LIBS . 'tests' . DS . 'test_app' . DS . 'controllers' . DS), + 'Model' => array(LIBS . 'tests' . DS . 'test_app' . DS . 'models' . DS) )); + App::uses('TestPluginAppController', 'TestPlugin.Controller'); App::uses('TestPluginController', 'TestPlugin.Controller'); $Controller = new TestPluginController();