Search moodle.org's
Developer Documentation

See Release Notes

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

Differences Between: [Versions 402 and 403]

(no description)

File Size: 381 lines (16 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class


Class: external_api_test  - X-Ref

Unit tests for core_external\external_api.

test_validate_params()   X-Ref
Test the validate_parameters method.


test_clean_returnvalue_return_php_type()   X-Ref
Test for clean_returnvalue() for testing that returns the PHP type.


test_clean_returnvalue()   X-Ref
Test for clean_returnvalue().


test_get_context_from_params()   X-Ref
Test \core_external\external_api::get_context_from_params().


test_get_context_params()   X-Ref
Test \core_external\external_api::get_context()_from_params parameter validation.


test_get_context_params2()   X-Ref
Test \core_external\external_api::get_context()_from_params parameter validation.


test_get_context_params3()   X-Ref
Test \core_external\external_api::get_context()_from_params parameter validation.


all_external_info_provider()   X-Ref
Data provider for the test_all_external_info test.

return: array

test_all_external_info(\stdClass $definition)   X-Ref
Test \core_external\external_api::external_function_info.

param: \stdClass $definition

test_call_external_function()   X-Ref
Test the \core_external\external_api::call_external_function() function.


get_context_from_params()   X-Ref
Call the get_contect_from_params methods on the api class.

return: mixed