Fix failing tests caused by changes in App::objects()

This commit is contained in:
mark_story 2011-11-06 09:59:33 -05:00
parent a7d08a6b39
commit cfe38985cf
2 changed files with 4 additions and 0 deletions

View file

@ -85,6 +85,7 @@ class CommandListShell extends Shell {
$shellList = $this->_appendShells('CORE', $shells, $shellList); $shellList = $this->_appendShells('CORE', $shells, $shellList);
$appShells = App::objects('Console/Command', null, false); $appShells = App::objects('Console/Command', null, false);
$appShells = array_diff($appShells, $shells);
$shellList = $this->_appendShells('app', $appShells, $shellList); $shellList = $this->_appendShells('app', $appShells, $shellList);
$plugins = CakePlugin::loaded(); $plugins = CakePlugin::loaded();

View file

@ -353,6 +353,9 @@ class ExtractTask extends Shell {
foreach ($models as $model) { foreach ($models as $model) {
App::uses($model, $plugin . 'Model'); App::uses($model, $plugin . 'Model');
$reflection = new ReflectionClass($model); $reflection = new ReflectionClass($model);
if (!$reflection->isSubClassOf('Model')) {
continue;
}
$properties = $reflection->getDefaultProperties(); $properties = $reflection->getDefaultProperties();
$validate = $properties['validate']; $validate = $properties['validate'];
if (empty($validate)) { if (empty($validate)) {