mirror of
https://github.com/Pathduck/gallery3.git
synced 2026-06-23 01:39:53 -04:00
Rejigger the way we do reinstalls while Kohana is running.
core_installer::install() now takes an $initial_install param that allows us to enforce that we're doing a clean install. Use this in both the scaffolding and the unit test code. Greatly simplify the scaffolding uninstall/reinstall code.
This commit is contained in:
@@ -89,14 +89,16 @@ class Gallery_Unit_Test_Controller extends Controller {
|
||||
@system("rm -rf test/var");
|
||||
@mkdir('test/var/logs', 0777, true);
|
||||
|
||||
// Reset our loaded modules
|
||||
// Reset our caches
|
||||
module::$module_names = array();
|
||||
module::$modules = array();
|
||||
module::$var_cache = array();
|
||||
$db->clear_cache();
|
||||
|
||||
// Install all modules
|
||||
// Force core and user to be installed first to resolve dependencies.
|
||||
module::install("core");
|
||||
core_installer::install(true);
|
||||
module::load_modules();
|
||||
module::install("user");
|
||||
$modules = array();
|
||||
foreach (glob(MODPATH . "*/helpers/*_installer.php") as $file) {
|
||||
|
||||
Reference in New Issue
Block a user