Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 3.10.x will end 8 November 2021 (12 months).
  • Bug fixes for security issues in 3.10.x will end 9 May 2022 (18 months).
  • PHP version: minimum PHP 7.2.0 Note: minimum PHP version has increased since Moodle 3.8. PHP 7.3.x and 7.4.x are supported too.

Class: core_moodle_url_testcase  - 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[]