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

Defines 1 class


Class: command_test  - X-Ref

Tests for the Matrix command class.

test_standard_instantiation()   X-Ref
Test instantiation of a command when no method is provided.


test_instantiation_without_auth()   X-Ref
Test instantiation of a command when no method is provided.


test_url_parsing(string $url,array $params,string $expected,)   X-Ref
Test processing of command URL properties.

param: string $url
param: array $params
param: string $expected

url_parsing_provider()   X-Ref
Data provider for url parsing tests.

return: array

test_url_parsing_extra_properties()   X-Ref
Test processing of command URL properties with an array which contains untranslated parameters.


test_url_parsing_unused_properites()   X-Ref
Test processing of command URL properties with an array which contains untranslated parameters.


test_parameters(string $endpoint,array $params,array $remainingparams,array $allparams,array $options,)   X-Ref
Test the parameter fetching, processing, and parsing.

param: string $endpoint
param: array $params
param: array $remainingparams
param: array $allparams
param: array $options

parameter_and_option_provider()   X-Ref
Data provider for parameter tests.

return: array

test_query_parameters(array $query,string $expected,)   X-Ref
Test the query parameter handling.

param: array $query
param: string $expected

query_provider()   X-Ref
Data provider for query parameter tests.

return: array

test_send_as_json(bool $sendasjson,string $endpoint,array $params,array $remainingparams,array $allparams,array $expectedoptions,)   X-Ref
Test the sendasjson constructor parameter.

param: bool $sendasjson
param: string $endpoint
param: array $params
param: array $remainingparams
param: array $allparams
param: array $expectedoptions

sendasjson_provider()   X-Ref
Test the sendasjosn option to the command constructor.

return: array

test_ignorehttperrors()   X-Ref
Test the sendasjosn option to the command constructor.