Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 3.11.x will end 14 Nov 2022 (12 months plus 6 months extension).
  • Bug fixes for security issues in 3.11.x will end 13 Nov 2023 (18 months plus 12 months extension).
  • PHP version: minimum PHP 7.3.0 Note: minimum PHP version has increased since Moodle 3.10. PHP 7.4.x is supported too.

Differences Between: [Versions 310 and 311] [Versions 39 and 311]

Contains class containing unit tests for mod/chat/lib.php.

Copyright: 2017 Mark Nelson <markn@moodle.com>
License: http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
File Size: 743 lines (31 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class


Class: lib_test  - X-Ref

Class containing unit tests for mod/chat/lib.php.

setUp()   X-Ref
No description

test_chat_core_calendar_provide_event_action_in_hidden_section()   X-Ref
No description

test_chat_core_calendar_provide_event_action_for_non_user()   X-Ref
No description

test_chat_core_calendar_provide_event_action_chattime_event_yesterday()   X-Ref
No description

test_chat_core_calendar_provide_event_action_chattime_event_yesterday_for_user()   X-Ref
No description

test_chat_core_calendar_provide_event_action_chattime_event_today()   X-Ref
No description

test_chat_core_calendar_provide_event_action_chattime_event_today_for_user()   X-Ref
No description

test_chat_core_calendar_provide_event_action_chattime_event_tonight()   X-Ref
No description

test_chat_core_calendar_provide_event_action_chattime_event_tonight_for_user()   X-Ref
No description

test_chat_core_calendar_provide_event_action_chattime_event_tomorrow()   X-Ref
No description

test_chat_core_calendar_provide_event_action_chattime_event_tomorrow_for_user()   X-Ref
No description

test_chat_core_calendar_provide_event_action_chattime_event_different_timezones()   X-Ref
No description

test_chat_get_sessions()   X-Ref
Test for chat_get_sessions().


test_chat_get_sessions_multiple()   X-Ref
Test for chat_get_sessions with messages belonging to multiple sessions.


test_chat_core_calendar_provide_event_action_already_completed()   X-Ref
No description

test_chat_core_calendar_provide_event_action_already_completed_for_user()   X-Ref
No description

create_action_event($courseid, $instanceid, $eventtype)   X-Ref
Creates an action event.

param: int $courseid
param: int $instanceid The chat id.
param: string $eventtype The event type. eg. ASSIGN_EVENT_TYPE_DUE.
return: bool|calendar_event

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 an chat.