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: 459 lines (15 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 1 file
 communication/provider/matrix/tests/matrix_client_test_trait.php

Defines 1 class


Class: matrix_client_test  - X-Ref

Tests for the matrix_client class.

instance_provider()   X-Ref
Data provider for valid calls to ::instance.

return: array

test_instance(?array $versions,string $expectedversion,)   X-Ref
Test that the instance method returns a valid instance for the given versions.

param: array|null $versions
param: string $expectedversion

test_instance_cached()   X-Ref
Test that the instance method returns a valid instance for the given versions.


test_instance_no_support()   X-Ref
Test that the instance method throws an appropriate exception if no support is found.


test_implements_feature(string $version,array|string $features,bool $expected,)   X-Ref
Test the feature implementation check methods.

param: string $version
param: array|string $features
param: bool $expected

test_require_feature(string $version,array|string $features,bool $expected,)   X-Ref
Test the feature implementation requirement methods.

param: string $version
param: array|string $features
param: bool $expected

test_require_features(string $version,array|string $features,bool $expected,)   X-Ref
Test the feature implementation requirement methods for a require all.

param: string $version
param: array|string $features
param: bool $expected

implements_feature_provider()   X-Ref
Data provider for feature implementation check tests.

return: array

require_features_provider()   X-Ref
Data provider for feature implementation check tests.

return: array

test_get_version(string $version,string $expectedversion,)   X-Ref
Test the get_version method.

param: string $version
param: string $expectedversion

get_version_provider()   X-Ref
Data provider for get_version tests.

return: array

test_meets_version(string $version,string $testversion,bool $expected,)   X-Ref
Tests the meets_version method.

param: string $version The version of the API to test against
param: string $testversion The version to test
param: bool $expected Whether the version meets the requirement

test_requires_version(string $version,string $testversion,bool $expected,)   X-Ref
Tests the requires_version method.

param: string $version The version of the API to test against
param: string $testversion The version to test
param: bool $expected Whether the version meets the requirement

meets_version_provider()   X-Ref
Data provider for meets_version tests.

return: array

test_command_is_executed()   X-Ref
Test the execute method with a command.