Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 3.10.x will end 8 November 2021 (12 months).
  • Bug fixes for security issues in 3.10.x will end 9 May 2022 (18 months).
  • PHP version: minimum PHP 7.2.0 Note: minimum PHP version has increased since Moodle 3.8. PHP 7.3.x and 7.4.x are supported too.

Differences Between: [Versions 310 and 311] [Versions 310 and 400] [Versions 310 and 401] [Versions 310 and 402] [Versions 310 and 403] [Versions 39 and 310]

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: 742 lines (31 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class


Class: mod_chat_lib_testcase  - 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.