Steps definitions related with permissions.
More...
Steps definitions related with permissions.
- Copyright
- 2013 David MonllaĆ³
- License
- http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later Steps definitions to set up permissions to capabilities.
- Copyright
- 2013 David MonllaĆ³
- License
- http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
◆ capability_has_permission()
behat_permissions::capability_has_permission |
( |
| $capabilityname, |
|
|
| $permission ) |
Checks if the capability has the specified permission.
Works in the role definition advanced page.
@Then /^"(?P<capability_string>(?:[^"]|::")*)" capability has "(?P<permission_string>Not set|Allow|Prevent|Prohibit)" permission$/
- Exceptions
-
- Parameters
-
string | $capabilityname | |
string | $permission | |
- Return values
-
◆ getSession()
behat_session_interface::getSession |
( |
| $name = null | ) |
|
|
inherited |
Returns the Mink session.
- Parameters
-
string | null | $name | name of the session OR active session will be used |
- Return values
-
Implemented in behat_form_field.
◆ i_define_the_allowed_role_assignments_for_a_role_as()
behat_permissions::i_define_the_allowed_role_assignments_for_a_role_as |
( |
| $rolename, |
|
|
| $table ) |
Set the allowed role assignments for the specified role.
@Given /^I define the allowed role assignments for the "(?P<rolefullname_string>(?:[^"]|::")*)" role as:$/
- Parameters
-
string | $rolename | |
TableNode | $table | |
- Return values
-
◆ i_fill_in_the_allowed_role_assignments_form_for_a_role_with()
behat_permissions::i_fill_in_the_allowed_role_assignments_form_for_a_role_with |
( |
| $sourcerole, |
|
|
| $table ) |
Fill in the allowed role assignments form for the specied role.
Takes a table with two columns. Each row should contain the target role, and either "Assignable" or "Not assignable".
@Given /^I fill in the allowed role assignments form for the "(?P<rolefullname_string>(?:[^"]|::")*)" role with:$/
- Parameters
-
String | $sourcerole | |
TableNode | $table | |
- Return values
-
◆ i_fill_the_capabilities_form_with_the_following_permissions()
behat_permissions::i_fill_the_capabilities_form_with_the_following_permissions |
( |
| $table | ) |
|
Fills the advanced permissions form with the provided data.
Expects a table with capability name and permission (Inherit/Allow/Prevent/Prohibit) columns. @Given /^I fill the capabilities form with the following permissions:$/
- Parameters
-
- Return values
-
◆ i_override_the_system_permissions_of_role_with()
behat_permissions::i_override_the_system_permissions_of_role_with |
( |
| $rolename, |
|
|
| $table ) |
Overrides system capabilities at category, course and module levels.
This step begins after clicking 'Permissions' link. Expects a table with capability name and permission (Inherit/Allow/Prevent/Prohibit) columns. @Given /^I override the system permissions of "(?P<rolefullname_string>(?:[^"]|::")*)" role with:$/
- Parameters
-
string | $rolename | |
TableNode | $table | |
◆ i_set_the_following_system_permissions_of_role()
behat_permissions::i_set_the_following_system_permissions_of_role |
( |
| $rolename, |
|
|
| $table ) |
Set system level permissions to the specified role.
Expects a table with capability name and permission (Inherit/Allow/Prevent/Prohibit) columns. @Given /^I set the following system permissions of "(?P<rolefullname_string>(?:[^"]|::")*)" role:$/
- Parameters
-
string | $rolename | |
TableNode | $table | |
◆ the_context_is_context_frozen()
behat_permissions::the_context_is_context_frozen |
( |
string | $element, |
|
|
string | $selector ) |
Mark context as frozen.
@Then /^the "(?P<element_string>(?:[^"]|::")*)" "(?P<selector_string>[^"]*)" is context frozen$/
- Exceptions
-
ExpectationException | if the context cannot be frozen or found |
- Parameters
-
string | $element | Element we look on |
string | $selector | The type of where we look (activity, course) |
◆ the_context_is_not_context_frozen()
behat_permissions::the_context_is_not_context_frozen |
( |
string | $element, |
|
|
string | $selector ) |
Unmark context as frozen.
@Then /^the "(?P<element_string>(?:[^"]|::")*)" "(?P<selector_string>[^"]*)" is not context frozen$/
- Exceptions
-
ExpectationException | if the context cannot be frozen or found |
- Parameters
-
string | $element | Element we look on |
string | $selector | The type of where we look (activity, course) |
◆ PAGE_READY_JS
const behat_session_interface::PAGE_READY_JS |
|
inherited |
Initial value:= "document.readyState === 'complete' && " .
"(typeof M !== 'object' || typeof M.util !== 'object' || " .
"typeof M.util.pending_js === 'undefined' || M.util.pending_js.length === 0)"
The JS code to check that the page is ready.
The document must be complete and either M.util.pending_js must be empty, or it must not be defined at all.
The documentation for this class was generated from the following file: