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.

(no description)

File Size: 571 lines (19 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 2 files
 communication/provider/matrix/tests/matrix_test_helper_trait.php
 communication/tests/communication_test_helper_trait.php

Defines 1 class


Class: communication_feature_test  - X-Ref

Class communication_feature_test to test the matrix features implemented using the core interfaces.

setUp()   X-Ref
No description

test_create_chat_room()   X-Ref
Test create or update chat room.


test_update_chat_room()   X-Ref
Test update of a chat room.


test_delete_chat_room()   X-Ref
Test delete chat room.


test_update_room_avatar(?string $before,?string $after,)   X-Ref
Test update room avatar.


avatar_provider()   X-Ref
Tests for setting and updating the room avatar.

return: array

test_get_chat_room_url()   X-Ref
Test get chat room url.


test_create_members()   X-Ref
Test create members.


test_add_and_remove_members_from_room()   X-Ref
Test add/remove members from room.


test_update_room_membership()   X-Ref
Test update of room membership.


test_get_user_allowed_power_level()   X-Ref
Test the user power level allocation according to context.


create_room(?string $component = 'communication_matrix',?string $itemtype = 'example',?int $itemid = 1,?string $roomname = null,?string $roomtopic = null,?\stored_file $roomavatar = null,array $members = [],?context $context = null,)   X-Ref
Helper to create a room.

param: null|string $component
param: null|string $itemtype
param: null|int $itemid
param: null|string $roomname
param: null|string $roomtopic
param: null|stored_file $roomavatar
param: array $members
return: api

test_is_configured()   X-Ref
Test if the selected provider is configured.