MDL-82424 behat: steps to handle plugins

This commit adds one new step to disable plugins, and also replaces the
regexp from the enable plugins method to make ti compatible with the
tool_generator create testing scenario.
This commit is contained in:
ferranrecio
2024-07-30 18:12:37 +02:00
committed by Sara Arjona
parent 1a33da6637
commit a3e810bf7e
+12
View File
@@ -2371,6 +2371,18 @@ EOF;
$class::enable_plugin($plugin, true);
}
/**
* Disable an specific plugin.
*
* @When /^I disable "(?P<plugin_string>(?:[^"]|\\")*)" "(?P<plugintype_string>[^"]*)" plugin$/
* @param string $plugin Plugin we look for
* @param string $plugintype The type of the plugin
*/
public function i_disable_plugin($plugin, $plugintype) {
$class = core_plugin_manager::resolve_plugininfo_class($plugintype);
$class::enable_plugin($plugin, false);
}
/**
* Set the default text editor to the named text editor.
*