diff options
-rw-r--r-- | modules/gallery_unit_test/controllers/gallery_unit_test.php | 17 | ||||
-rw-r--r-- | modules/user/helpers/group.php | 2 |
2 files changed, 10 insertions, 9 deletions
diff --git a/modules/gallery_unit_test/controllers/gallery_unit_test.php b/modules/gallery_unit_test/controllers/gallery_unit_test.php index f72b1b08..58e0d9c5 100644 --- a/modules/gallery_unit_test/controllers/gallery_unit_test.php +++ b/modules/gallery_unit_test/controllers/gallery_unit_test.php @@ -106,16 +106,17 @@ class Gallery_Unit_Test_Controller extends Controller { module::install("user"); module::activate("user"); - $modules = $paths =array(); - foreach ($active_modules as $module) { - if (file_exists($path = MODPATH . "{$module->name}/tests")) { - $paths[] = $path; - } - if (in_array($module->name, array("gallery", "user"))) { + $modules = $paths = array(); + foreach (module::available() as $module_name => $unused) { + if (in_array($module_name, array("gallery", "user"))) { + $paths[] = MODPATH . "{$module_name}/tests"; continue; } - module::install($module->name); - module::activate($module->name); + if (file_exists($path = MODPATH . "{$module_name}/tests")) { + $paths[] = $path; + module::install($module_name); + module::activate($module_name); + } } Kohana::config_set('unit_test.paths', $paths); diff --git a/modules/user/helpers/group.php b/modules/user/helpers/group.php index e65b6c96..3aaf1b11 100644 --- a/modules/user/helpers/group.php +++ b/modules/user/helpers/group.php @@ -83,7 +83,7 @@ class group_Core { * @param string $value value to match * @return Group_Definition the group object, or null if the name was invalid. */ - private function _lookup_by_field($field_name, $value) { + private static function _lookup_by_field($field_name, $value) { try { $user = model_cache::get("group", $value, $field_name); if ($user->loaded) { |