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.

Class: outputrequirementslib_test  - X-Ref

Unit tests for lib/outputrequirementslibphp.

test_string_for_js()   X-Ref
No description

test_one_time_output_normal_case()   X-Ref
No description

test_one_time_output_repeat_output_throws()   X-Ref
No description

test_one_time_output_different_pages_independent()   X-Ref
No description

test_jquery_plugin()   X-Ref
Test for the jquery_plugin method.

Test to make sure that backslashes are not generated with either slasharguments set to on or off.

test_js_call_amd()   X-Ref
Test AMD modules loading.


test_js_fix_url_moodle_url(\moodle_url $moodleurl, int $cfgslashargs, string $expected)   X-Ref
Test the actual URL through which a JavaScript file is served.

param: \moodle_url $moodleurl The <u>moodle_url</u> instance pointing to a web resource.
param: int $cfgslashargs The value to force $CFG->slasharguments.
param: string $expected The expected output URL.

js_fix_url_moodle_url_provider()   X-Ref
Data provider for JavaScript proper Handler using a <u>\moodle_url</url>.

return: array

test_js_fix_url_plain_string(string $url, int $cfgslashargs, string $expected)   X-Ref
Test the actual url through which a JavaScript file is served.

param: string $url The URL pointing to a web resource.
param: int $cfgslashargs The value to force $CFG->slasharguments.
param: string $expected The expected output URL.

js_fix_url_plain_string_provider()   X-Ref
Data provider for JavaScript proper Handler using a plain relative string.

return: array

test_js_fix_url_coding_exception($url, string $exmessage)   X-Ref
Test the coding exceptions when trying to get the actual URL through which a JavaScript file is served.

param: moodle_url|string|null $url The URL pointing to a web resource.
param: string $exmessage The expected output URL.

js_fix_url_coding_exception_provider()   X-Ref
Data provider for throwing coding exceptions in <u>\page_requirements_manager::js_fix_url()</u>.

return: array