Differences Between: [Versions 310 and 400] [Versions 311 and 400] [Versions 39 and 400] [Versions 400 and 401] [Versions 400 and 402] [Versions 400 and 403]
Data generators for acceptance testing.
Copyright: | 2012 David MonllaĆ³ |
License: | http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later |
File Size: | 1247 lines (47 kb) |
Included or required: | 0 times |
Referenced: | 0 times |
Includes or requires: | 0 files |
behat_core_generator:: (33 methods):
get_creatable_entities()
get_gradeitem_id()
preprocess_course()
preprocess_user()
preprocess_cohort()
preprocess_grade_item()
process_activity()
process_block_instance()
process_customlang()
process_langpack()
process_enrol_user()
process_permission_override()
process_system_role_assign()
process_role_assign()
process_role()
process_role_capability()
process_cohort_member()
process_question_category()
process_question()
process_message_contacts()
process_private_messages()
process_group_messages()
process_favourite_conversations()
process_mute_group_conversations()
process_mute_private_conversations()
preprocess_analytics_model()
process_analytics_model()
process_user_preferences()
process_contentbank_content()
process_badge_external_backpack()
process_setup_backpack_connected()
process_notification()
process_last_access_times()
Class: behat_core_generator - X-Ref
Behat data generator class for core entities.get_creatable_entities() X-Ref |
No description |
get_gradeitem_id(string $name) X-Ref |
Get the grade item id using a name. return: int The grade item id param: string $name |
preprocess_course($data) X-Ref |
Remove any empty custom fields, to avoid errors when creating the course. return: array param: array $data |
preprocess_user($data) X-Ref |
If password is not set it uses the username. return: array param: array $data |
preprocess_cohort($data) X-Ref |
If contextlevel and reference are specified for cohort, transform them to the contextid. return: array param: array $data |
preprocess_grade_item($data) X-Ref |
Preprocesses the creation of a grade item. Converts gradetype text to a number. return: array param: array $data |
process_activity($data) X-Ref |
Adapter to modules generator. return: void param: array $data |
process_block_instance($data) X-Ref |
Add a block to a page. param: array $data should mostly match the fields of the block_instances table. |
process_customlang($data) X-Ref |
Creates language customisation. return: void param: array $data |
process_langpack($data) X-Ref |
Imports a langpack. param: array $data |
process_enrol_user($data) X-Ref |
Adapter to enrol_user() data generator. return: void param: array $data |
process_permission_override($data) X-Ref |
Allows/denies a capability at the specified context return: void param: array $data |
process_system_role_assign($data) X-Ref |
Assigns a role to a user at system context Used by "system role assigns" can be deleted when system role assign will be deprecated in favour of "role assigns" return: void param: array $data |
process_role_assign($data) X-Ref |
Assigns a role to a user at the specified context return: void param: array $data |
process_role($data) X-Ref |
Creates a role. return: void param: array $data |
process_role_capability($data) X-Ref |
Assign capabilities to a role. param: array $data |
process_cohort_member($data) X-Ref |
Adds members to cohorts return: void param: array $data |
process_question_category($data) X-Ref |
Create a question category. param: array $data the row of data from the behat script. |
process_question($data) X-Ref |
Create a question. Creating questions relies on the question/type/.../tests/helper.php mechanism. We start with test_question_maker::get_question_form_data($data['qtype'], $data['template']) and then overlay the values from any other fields of $data that are set. There is a special case that allows you to set qtype to 'missingtype'. This creates an example of broken question, such as you might get if you install a question type, create some questions of that type, and then uninstall the question type (which is prevented through the UI but can still happen). This special lets tests verify that these questions are handled OK. param: array $data the row of data from the behat script. |
process_message_contacts($data) X-Ref |
Adds user to contacts return: void param: array $data |
process_private_messages(array $data) X-Ref |
Send a new message from user to contact in a private conversation return: void param: array $data |
process_group_messages(array $data) X-Ref |
Send a new message from user to a group conversation return: void param: array $data |
process_favourite_conversations(array $data) X-Ref |
Mark a private conversation as favourite for user return: void param: array $data |
process_mute_group_conversations(array $data) X-Ref |
Mute an existing group conversation for user return: void param: array $data |
process_mute_private_conversations(array $data) X-Ref |
Mute a private conversation for user return: void param: array $data |
preprocess_analytics_model($data) X-Ref |
Transform indicators string into array. return: array param: array $data |
process_analytics_model($data) X-Ref |
Creates an analytics model return: void param: target $data |
process_user_preferences(array $data) X-Ref |
Set a preference value for user return: void param: array $data |
process_contentbank_content(array $data) X-Ref |
Create content in the given context's content bank. return: void param: array $data |
process_badge_external_backpack(array $data) X-Ref |
Create a exetrnal backpack. param: array $data |
process_setup_backpack_connected(array $data) X-Ref |
Setup a backpack connected for user. param: array $data |
process_notification(array $data) X-Ref |
Creates notifications to specific user. return: void param: array $data |
process_last_access_times(array $data) X-Ref |
Creates user last access data within given courses. return: void param: array $data |