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_setuplib_testcase  - X-Ref

Unit tests for setuplib.php

test_get_docs_url_standard()   X-Ref
Test get_docs_url_standard in the normal case when we should link to Moodle docs.


test_get_docs_url_http()   X-Ref
Test get_docs_url_standard in the special case of an absolute HTTP URL.


test_get_docs_url_https()   X-Ref
Test get_docs_url_standard in the special case of an absolute HTTPS URL.


test_get_docs_url_wwwroot()   X-Ref
Test get_docs_url_standard in the special case of a link relative to wwwroot.


test_exception_info_removes_serverpaths()   X-Ref
Test if get_exception_info() removes file system paths.


test_localcachedir()   X-Ref
No description

test_make_unique_directory_basedir_is_file()   X-Ref
No description

test_make_unique_directory()   X-Ref
No description

test_get_request_storage_directory()   X-Ref
No description

test_make_request_directory()   X-Ref
No description

test_merge_query_params()   X-Ref
No description

test_get_exception_info_link()   X-Ref
Test the link processed by get_exception_info().


get_exception_info($ex)   X-Ref
Wrapper to call {@link get_exception_info()}.

param: Exception $ex An exception.
return: stdClass of information.

data_for_test_get_real_size()   X-Ref
Data provider for test_get_real_size().

return: array An array of arrays contain test data

test_get_real_size($input, $expectedbytes)   X-Ref
Test the get_real_size() function.

param: string $input the input for get_real_size()
param: int $expectedbytes the expected bytes

is_valid_uuid_v4($value)   X-Ref
Validate the given V4 UUID.

param: string $value The candidate V4 UUID
return: bool True if valid; otherwise, false.

test_core_uuid_generate_uuid_via_pecl_uuid_extension()   X-Ref
Test the \core\uuid::generate_uuid_via_pecl_uuid_extension() function.


test_core_uuid_generate_uuid_via_random_bytes()   X-Ref
Test the \core\uuid::generate_uuid_via_random_bytes() function.


test_core_uuid_generate()   X-Ref
Test the \core\uuid::generate() function.