mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-31 09:06:17 +00:00
load app classes automatically for plugins
Otherwise baking a test for a plugin model (example) fails
This commit is contained in:
parent
2c1b5d978d
commit
08c3008874
1 changed files with 6 additions and 0 deletions
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue