-
Improvement
-
Resolution: Fixed
-
Minor
-
2.8.2
-
None
-
MOODLE_28_STABLE
-
MOODLE_28_STABLE
Some moodle admins may override the standard role names and shortnames. In such cases tests that perform enrollments by the standard role names will not work. It is possible to add config parameter in config.php to indicate the role short name overrides for testing. For example:
|
define('PHPUNIT_ROLENAME_EDITINGTEACHER', 'instructor');
|
In tests we can get the actual role shortname by calling a designated helper method, in following way:
$teacherroleshortname = \mod_dataform\helper\testing::get_role_shortname('editingteacher');
|