Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 3.11.x will end 14 Nov 2022 (12 months plus 6 months extension).
  • Bug fixes for security issues in 3.11.x will end 13 Nov 2023 (18 months plus 12 months extension).
  • PHP version: minimum PHP 7.3.0 Note: minimum PHP version has increased since Moodle 3.10. PHP 7.4.x is supported too.

Class: moodle_url_test  - X-Ref

Tests for moodle_url.

test_moodle_url_constructor()   X-Ref
Test basic moodle_url construction.


test_moodle_url_get_path()   X-Ref
Tests \moodle_url::get_path().


test_moodle_url_round_trip()   X-Ref
No description

test_moodle_url_empty_param_values()   X-Ref
Test Moodle URL objects created with a param with empty value.


test_moodle_url_set_good_scheme()   X-Ref
Test set good scheme on Moodle URL objects.


test_moodle_url_set_bad_scheme()   X-Ref
Test set bad scheme on Moodle URL objects.


test_moodle_url_round_trip_array_params()   X-Ref
No description

test_compare_url()   X-Ref
No description

test_out_as_local_url()   X-Ref
No description

test_out_as_local_url_error()   X-Ref
No description

test_modified_url_out_as_local_url_error()   X-Ref
You should get error with modified url


test_https_out_as_local_url_error()   X-Ref
Try get local url from external https url and you should get error


test_moodle_url_get_scheme()   X-Ref
No description

test_moodle_url_get_host()   X-Ref
No description

test_moodle_url_get_port()   X-Ref
No description

test_make_pluginfile_url($slashargs, $args, $expected)   X-Ref
Test the make_pluginfile_url function.

param: bool    $slashargs
param: array   $args Args to be provided to make_pluginfile_url
param: string  $expected The expected result

make_pluginfile_url_provider()   X-Ref
Data provider for make_pluginfile_url tests.

return: array[]