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.

Trait communication_test_helper_trait to generate initial setup for communication providers.

Copyright: 2023 Safat Shahin <safat.shahin@moodle.com>
License: http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
File Size: 117 lines (4 kb)
Included or required: 6 times
Referenced: 0 times
Includes or requires: 0 files

Defines 5 functions


Functions that are not part of a class:

setup_communication_configs()   X-Ref
Setup necessary configs for communication subsystem.

return: void

disable_communication_configs()   X-Ref
Disable configs for communication subsystem.

return: void

get_course(string $roomname = 'Sampleroom',string $provider = 'communication_matrix')   X-Ref
Get or create course if it does not exist

param: string $roomname The room name for the communication api
param: string $provider The selected provider
return: \stdClass

get_user(string $firstname = 'Samplefn',string $lastname = 'Sampleln',string $username = 'sampleun')   X-Ref
Get or create user if it does not exist.

param: string $firstname The user's firstname for the communication api
param: string $lastname The user's lastname for the communication api
param: string $username The user's username for the communication api
return: \stdClass

create_communication_file(string $filename,string $storedname,)   X-Ref
Create a stored_file in a draft file area from a fixture file.

param: string $filename The file name within the communication/tests/fixtures folder.
param: string $storedname The name to use in the database.
return: \stored_file