MDL-69231 behat: remaining work for role capability generator

This commit does few things:
* Unify data generators usage to role short name.
* Replace remaining manual steps to use the new data generator.
* Also replaced other manual steps to set config to use data generators.
* Tidy up of some tests, aligning pipes and splitting one line steps into multiple lines.
* Fixes tests to have one Given/When/Then per scenario.
This commit is contained in:
Simey Lameze
2023-06-02 12:47:27 +08:00
parent aa2fc4048e
commit 2367bc9ff6
32 changed files with 127 additions and 171 deletions
+3 -3
View File
@@ -871,9 +871,9 @@ EOD;
/**
* Set role capabilities for the specified role.
*
* @param int $roleid The Role to set capabilities for
* @param array $rolecapabilities The list of capability =>permission to set for this role
* @param context $context The context to apply this capability to
* @param int $roleid The Role to set capabilities for
* @param array $rolecapabilities The list of capability =>permission to set for this role
* @param null|context $context The context to apply this capability to
*/
public function create_role_capability(int $roleid, array $rolecapabilities, context $context = null): void {
// Map the capabilities into human-readable names.