load app classes automatically for plugins

Otherwise baking a test for a plugin model (example) fails
This commit is contained in:
AD7six 2012-05-10 23:29:47 +02:00
parent 2c1b5d978d
commit 08c3008874

View file

@ -241,6 +241,12 @@ class TestTask extends BakeTask {
*/
public function isLoadableClass($package, $class) {
App::uses($class, $package);
list($plugin, $ns) = pluginSplit($package);
if ($plugin) {
App::uses("{$plugin}AppController", $package);
App::uses("{$plugin}AppModel", $package);
App::uses("{$plugin}AppHelper", $package);
}
return class_exists($class);
}