Skip to content

Commit

Permalink
load app classes automatically for plugins
Browse files Browse the repository at this point in the history
Otherwise baking a test for a plugin model (example) fails
  • Loading branch information
AD7six committed May 10, 2012
1 parent 2c1b5d9 commit 08c3008
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions lib/Cake/Console/Command/Task/TestTask.php
Expand Up @@ -241,6 +241,12 @@ public function typeCanDetectFixtures($type) {
*/
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);
}

Expand Down

0 comments on commit 08c3008

Please sign in to comment.