summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--index.php1
-rw-r--r--modules/gallery_unit_test/controllers/gallery_unit_test.php5
2 files changed, 6 insertions, 0 deletions
diff --git a/index.php b/index.php
index 938eb448..dd226f5b 100644
--- a/index.php
+++ b/index.php
@@ -51,6 +51,7 @@ if (PHP_SAPI == 'cli') {
define('TEST_MODE', 1);
@system('mkdir -p test/var/logs');
define('VARPATH', strtr(realpath('test/var') . '/', DIRECTORY_SEPARATOR, '/'));
+ @copy("var/database.php", VARPATH . "database.php");
} else {
if (file_exists('var')) {
define('VARPATH', strtr(realpath('var') . '/', DIRECTORY_SEPARATOR, '/'));
diff --git a/modules/gallery_unit_test/controllers/gallery_unit_test.php b/modules/gallery_unit_test/controllers/gallery_unit_test.php
index 2d70aad8..d5ea21ed 100644
--- a/modules/gallery_unit_test/controllers/gallery_unit_test.php
+++ b/modules/gallery_unit_test/controllers/gallery_unit_test.php
@@ -82,6 +82,11 @@ class Gallery_Unit_Test_Controller extends Controller {
continue;
}
+ $modules = Kohana::config('core.modules');
+ $modules[] = MODPATH . $module_name;
+ Kohana::config_set('core.modules', $modules);
+ require_once(DOCROOT . "modules/${module_name}/helpers/${module_name}_installer.php");
+
$installer_class = "{$module_name}_installer";
if (method_exists($installer_class, "install")) {
call_user_func_array(array($installer_class, "install"), array());