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.

Class: http_client_test  - X-Ref

Unit tests for guzzle integration in core.

read_object_attribute(object $object, string $attributename)   X-Ref
Read the object attributes and return the configs for test.

param: object $object
param: string $attributename
return: mixed

test_http_client_can_send_synchronously()   X-Ref
Test http client can send request synchronously.


test_http_client_has_options()   X-Ref
Test http client can have options as a part of the request.


test_http_client_can_modify_the_header_for_each_request()   X-Ref
Test guzzle can have headers changed in the request.


test_can_unset_request_option_with_null()   X-Ref
Test guzzle can unset options.


test_basic_cookie_jar()   X-Ref
Test the basic cookiejar functionality.


test_shared_cookie_jar()   X-Ref
Test the basic shared cookiejar.


test_guzzle_basics_with_security_helper()   X-Ref
Test guzzle security helper.


test_http_client_proxy_bypass()   X-Ref
Test guzzle proxy bypass with moodle.


test_moodle_allow_redirects_can_be_true()   X-Ref
Test moodle redirect can be set with guzzle.


test_redirects_with_absolute_uri()   X-Ref
Test redirect with absolute url.


test_redirects_with_relative_uri()   X-Ref
Test redirect with relatetive url.


test_http_client_cache_item()   X-Ref
Test guzzle cache middleware.