Fix bootstrap / installation issue for unit test framework:

Install user module before installing other modules. E.g. local_import's installation routine depends on the user module to be installed.
This commit is contained in:
Andy Staudacher
2009-02-24 05:27:07 +00:00
parent 9bba87ddc5
commit 41600a982f

View File

@@ -91,11 +91,13 @@ class Gallery_Unit_Test_Controller extends Controller {
module::load_modules();
// Install all modules
// Force core and user to be installed first to resolve dependencies.
module::install("core");
module::install("user");
$modules = array();
foreach (glob(MODPATH . "*/helpers/*_installer.php") as $file) {
$module_name = basename(dirname(dirname($file)));
if ($module_name == "core") {
if (in_array($module_name, array("core", "user"))) {
continue;
}
module::install($module_name);