Commit d3c986c6 authored by Robert Lyon's avatar Robert Lyon Committed by Gerrit Code Review
Browse files

Merge "Bug 1515794: Fixing incomplete phpunit database teardown"

parents cf607886 b8682571
...@@ -94,15 +94,12 @@ class UnitTestBootstrap { ...@@ -94,15 +94,12 @@ class UnitTestBootstrap {
// this can't be done in a transaction because sometimes // this can't be done in a transaction because sometimes
// things exist in the database that aren't in the file or the other way around // things exist in the database that aren't in the file or the other way around
// in the case where there are stale tables and then the code is upgraded // in the case where there are stale tables and then the code is upgraded
foreach (array_reverse(plugin_types_installed()) as $t) { foreach (get_installed_plugins_paths() as $pluginpath) {
if ($installed = plugins_installed($t, true)) { $location = $pluginpath . '/db/';
foreach ($installed as $p) { log_info('Uninstalling ' . $location);
$location = get_config('docroot') . $t . '/' . $p->name. '/db/'; $xmldbfile = $location . 'install.xml';
log_info('Uninstalling ' . $location); if (is_readable($xmldbfile)) {
if (is_readable($location . 'install.xml')) { uninstall_from_xmldb_file($xmldbfile);
uninstall_from_xmldb_file($location . 'install.xml');
}
}
} }
} }
// now uninstall core // now uninstall core
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment