Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 4.3.x will end 7 October 2024 (12 months).
  • Bug fixes for security issues in 4.3.x will end 21 April 2025 (18 months).
  • PHP version: minimum PHP 8.0.0 Note: minimum PHP version has increased since Moodle 4.1. PHP 8.2.x is supported too.

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

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.