Differences Between: [Versions 310 and 403] [Versions 311 and 403] [Versions 39 and 403] [Versions 400 and 403] [Versions 401 and 403]
(no description)
File Size: | 129 lines (5 kb) |
Included or required: | 1 time |
Referenced: | 56 times |
Includes or requires: | 0 files |
externallib_advanced_testcase:: (3 methods):
assignUserCapability()
configure_filters()
unassignUserCapability()
Class: externallib_advanced_testcase - X-Ref
Helper base class for external tests. Helpfull to test capabilities.assignUserCapability($capability, $contextid, $roleid = null) X-Ref |
Assign a capability to $USER The function creates a student $USER if $USER->id is empty param: string $capability capability name param: int|context $contextid param: int $roleid return: int the role id - mainly returned for creation, so calling function can reuse it |
configure_filters($filters) X-Ref |
Configure some filters for external tests. param: array $filters Filters to enable. Each filter should contain: |
unassignUserCapability($capability, $contextid = null, $roleid = null, $courseid = null, $enrol = 'manual') X-Ref |
Unassign a capability to $USER. param: string $capability capability name. param: int $contextid set the context id if you used assignUserCapability. param: int $roleid set the role id if you used assignUserCapability. param: int $courseid set the course id if you used getDataGenerator->enrol_users. param: string $enrol set the enrol plugin name if you used getDataGenerator->enrol_users with a different plugin than 'manual'. |