/** * Implements AcsfEventHandler::handle(). */ public function handle() { drush_print(dt('Entered @class', array('@class' => get_class($this)))); $enable_for_scrub = acsf_vget('acsf_duplication_enable_for_scrub', array()); if (!empty($enable_for_scrub)) { require_once DRUPAL_ROOT . '/includes/install.inc'; // Re-disable modules that were disabled prior to starting the scrubbing // process, and enabled only for scrubbing. module_disable($enable_for_scrub); // Uninstall these modules. Drupal will drop their tables and any orphaned // data remaining in them. drupal_uninstall_modules($enable_for_scrub); } }
/** * Disabled and uninstall modules. * * @AfterScenario */ public function cleanModule() { if (isset($this->modules) && !empty($this->modules)) { // Disable and uninstall any modules that were enabled. module_disable($this->modules); $res = drupal_uninstall_modules($this->modules); unset($this->modules); } }
/** * Disabled and uninstall modules. * * @AfterScenario */ public function cleanModule() { if (!empty($this->modules)) { // Disable and uninstall any modules that were enabled. module_disable($this->modules); drupal_uninstall_modules($this->modules); $this->modules = array(); } }
/** * This function will not perform an uninstallation * * @param array $modules * @param bool|false $uninstallDependents * * @return bool Returns false if $uninstallDependents is true and a module in $modules list has dependents which are * not already uninstalled and also not included in $modules list. */ public function uninstallModule(array $modules, $uninstallDependents = true) { include_once DRUPAL_ROOT . '/includes/install.inc'; return drupal_uninstall_modules($modules, $uninstallDependents); }
/** * Checks the behavior when enabling/disabling plug_test module. * * @param array $results * Array containing the base plugins defined in plug_example module. * @param array $extra * Array containing the extra plugins defined in plug_test module. * @param $path * Path to the test page. * @param $cid * Cache id related to the plugin type */ protected function assertTestModulePlugins(array $results, array $extra, $path, $cid) { $modules = array('plug_test'); module_enable($modules); cache_clear_all($cid, 'cache'); $this->assertExamplePageResults(array_merge($results, $extra), $path); module_disable($modules); drupal_uninstall_modules($modules); cache_clear_all($cid, 'cache'); $this->assertExamplePageResults($results, $path); }