Differences Between: [Versions 310 and 311] [Versions 311 and 400] [Versions 311 and 401] [Versions 311 and 402] [Versions 311 and 403] [Versions 39 and 311]
Data generators for acceptance testing.
Copyright: | 2012 David MonllaĆ³ |
License: | http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later |
File Size: | 1232 lines (46 kb) |
Included or required: | 0 times |
Referenced: | 0 times |
Includes or requires: | 0 files |
behat_core_generator:: (32 methods):
get_creatable_entities()
get_gradeitem_id()
preprocess_course()
preprocess_user()
preprocess_cohort()
preprocess_grade_item()
process_activity()
process_block_instance()
process_customlang()
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. param: string $name return: int The grade item id |
preprocess_course($data) X-Ref |
Remove any empty custom fields, to avoid errors when creating the course. param: array $data return: array |
preprocess_user($data) X-Ref |
If password is not set it uses the username. param: array $data return: array |
preprocess_cohort($data) X-Ref |
If contextlevel and reference are specified for cohort, transform them to the contextid. param: array $data return: array |
preprocess_grade_item($data) X-Ref |
Preprocesses the creation of a grade item. Converts gradetype text to a number. param: array $data return: array |
process_activity($data) X-Ref |
Adapter to modules generator. param: array $data return: void |
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. param: array $data return: void |
process_enrol_user($data) X-Ref |
Adapter to enrol_user() data generator. param: array $data return: void |
process_permission_override($data) X-Ref |
Allows/denies a capability at the specified context param: array $data return: void |
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" param: array $data return: void |
process_role_assign($data) X-Ref |
Assigns a role to a user at the specified context param: array $data return: void |
process_role($data) X-Ref |
Creates a role. param: array $data return: void |
process_role_capability($data) X-Ref |
Assign capabilities to a role. param: array $data |
process_cohort_member($data) X-Ref |
Adds members to cohorts param: array $data return: void |
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 param: array $data return: void |
process_private_messages(array $data) X-Ref |
Send a new message from user to contact in a private conversation param: array $data return: void |
process_group_messages(array $data) X-Ref |
Send a new message from user to a group conversation param: array $data return: void |
process_favourite_conversations(array $data) X-Ref |
Mark a private conversation as favourite for user param: array $data return: void |
process_mute_group_conversations(array $data) X-Ref |
Mute an existing group conversation for user param: array $data return: void |
process_mute_private_conversations(array $data) X-Ref |
Mute a private conversation for user param: array $data return: void |
preprocess_analytics_model($data) X-Ref |
Transform indicators string into array. param: array $data return: array |
process_analytics_model($data) X-Ref |
Creates an analytics model param: target $data return: void |
process_user_preferences(array $data) X-Ref |
Set a preference value for user param: array $data return: void |
process_contentbank_content(array $data) X-Ref |
Create content in the given context's content bank. param: array $data return: void |
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. param: array $data return: void |
process_last_access_times(array $data) X-Ref |
Creates user last access data within given courses. param: array $data return: void |