MDL-78553 behat: Add disable communication helper trait
This commit is contained in:
@@ -37,4 +37,13 @@ class behat_communication extends \behat_base {
|
||||
public function enable_communication_experimental_feature(): void {
|
||||
$this->setup_communication_configs();
|
||||
}
|
||||
|
||||
/**
|
||||
* Disable communication experimental feature.
|
||||
*
|
||||
* @Given /^I disable communication experimental feature$/
|
||||
*/
|
||||
public function disable_communication_experimental_feature(): void {
|
||||
$this->disable_communication_configs();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -35,6 +35,15 @@ trait communication_test_helper_trait {
|
||||
set_config('enablecommunicationsubsystem', 1);
|
||||
}
|
||||
|
||||
/**
|
||||
* Disable configs for communication subsystem.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
protected function disable_communication_configs(): void {
|
||||
set_config('enablecommunicationsubsystem', 0);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get or create course if it does not exist
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user