Differences Between: [Versions 310 and 402] [Versions 311 and 402] [Versions 39 and 402] [Versions 400 and 402] [Versions 401 and 402]
SCORM module library functions tests
Copyright: | 2015 Juan Leyva <juan@moodle.com> |
License: | http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later |
File Size: | 908 lines (36 kb) |
Included or required: | 0 times |
Referenced: | 0 times |
Includes or requires: | 0 files |
lib_test:: (21 methods):
setUp()
test_scorm_check_mode()
test_scorm_view()
test_scorm_check_and_require_available()
test_scorm_get_last_completed_attempt()
test_scorm_core_calendar_provide_event_action_open()
test_scorm_core_calendar_provide_event_action_closed()
test_scorm_core_calendar_provide_event_action_open_in_future()
test_scorm_core_calendar_provide_event_action_with_different_user_as_admin()
test_scorm_core_calendar_provide_event_action_no_time_specified()
test_scorm_core_calendar_provide_event_action_already_completed()
test_scorm_core_calendar_provide_event_action_already_completed_for_user()
create_action_event()
test_mod_scorm_completion_get_active_rule_descriptions()
test_mod_scorm_core_calendar_event_timestart_updated_unknown_event()
test_mod_scorm_core_calendar_event_timestart_updated_open_event()
test_mod_scorm_core_calendar_event_timestart_updated_close_event()
test_mod_scorm_core_calendar_get_valid_event_timestart_range_unknown_event()
test_mod_scorm_core_calendar_get_valid_event_timestart_range_open_event()
test_mod_scorm_core_calendar_get_valid_event_timestart_range_close_event()
test_creation_with_no_calendar_capabilities()
setUp() X-Ref |
Set up for every test |
test_scorm_check_mode() X-Ref |
No description |
test_scorm_view() X-Ref |
Test scorm_view return: void |
test_scorm_check_and_require_available() X-Ref |
Test scorm_get_availability_status and scorm_require_available return: void |
test_scorm_get_last_completed_attempt() X-Ref |
Test scorm_get_last_completed_attempt return: void |
test_scorm_core_calendar_provide_event_action_open() X-Ref |
No description |
test_scorm_core_calendar_provide_event_action_closed() X-Ref |
No description |
test_scorm_core_calendar_provide_event_action_open_in_future() X-Ref |
No description |
test_scorm_core_calendar_provide_event_action_with_different_user_as_admin() X-Ref |
No description |
test_scorm_core_calendar_provide_event_action_no_time_specified() X-Ref |
No description |
test_scorm_core_calendar_provide_event_action_already_completed() X-Ref |
No description |
test_scorm_core_calendar_provide_event_action_already_completed_for_user() X-Ref |
No description |
create_action_event($courseid, $instanceid, $eventtype, $timestart = null) X-Ref |
Creates an action event. param: int $courseid param: int $instanceid The data id. param: string $eventtype The event type. eg. DATA_EVENT_TYPE_OPEN. param: int|null $timestart The start timestamp for the event return: bool|calendar_event |
test_mod_scorm_completion_get_active_rule_descriptions() X-Ref |
Test the callback responsible for returning the completion rule descriptions. This function should work given either an instance of the module (cm_info), such as when checking the active rules, or if passed a stdClass of similar structure, such as when checking the the default completion settings for a mod type. |
test_mod_scorm_core_calendar_event_timestart_updated_unknown_event() X-Ref |
An unkown event type should not change the scorm instance. |
test_mod_scorm_core_calendar_event_timestart_updated_open_event() X-Ref |
A SCORM_EVENT_TYPE_OPEN event should update the timeopen property of the scorm activity. |
test_mod_scorm_core_calendar_event_timestart_updated_close_event() X-Ref |
A SCORM_EVENT_TYPE_CLOSE event should update the timeclose property of the scorm activity. |
test_mod_scorm_core_calendar_get_valid_event_timestart_range_unknown_event() X-Ref |
An unkown event type should not have any limits |
test_mod_scorm_core_calendar_get_valid_event_timestart_range_open_event() X-Ref |
The open event should be limited by the scorm's timeclose property, if it's set. |
test_mod_scorm_core_calendar_get_valid_event_timestart_range_close_event() X-Ref |
The close event should be limited by the scorm's timeopen property, if it's set. |
test_creation_with_no_calendar_capabilities() X-Ref |
A user who does not have capabilities to add events to the calendar should be able to create a SCORM. |