Search moodle.org's
Developer Documentation

See Release Notes
Long Term Support Release

  • Bug fixes for general core bugs in 4.1.x will end 13 November 2023 (12 months).
  • Bug fixes for security issues in 4.1.x will end 10 November 2025 (36 months).
  • PHP version: minimum PHP 7.4.0 Note: minimum PHP version has increased since Moodle 4.0. PHP 8.0.x is supported too.

(no description)

File Size: 969 lines (40 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class


Class: preset_test  - X-Ref

Preset tests class for mod_data.

test_create_from_plugin()   X-Ref
Test for static create_from_plugin method.


test_create_from_storedfile()   X-Ref
Test for static create_from_storedfile method.


test_create_from_instance()   X-Ref
Test for static create_from_instance method.


test_create_from_fullname()   X-Ref
Test for static create_from_fullname method.


test_save_new_preset()   X-Ref
Test for the save a preset method when the preset hasn't been saved before.


test_save_existing_preset()   X-Ref
Test for the save a preset method when is an existing preset that has been saved before.


test_export()   X-Ref
Test for the export a preset method.


test_get_userid()   X-Ref
Test for get_userid().


test_get_path()   X-Ref
Test for get_path().


test_is_directory_a_preset(string $directory, bool $expected)   X-Ref
Test for is_directory_a_preset().

param: string $directory
param: bool $expected

is_directory_a_preset_provider()   X-Ref
Data provider for test_is_directory_a_preset().

return: array

test_get_name_from_plugin()   X-Ref
Test for get_name_from_plugin().


test_get_description_from_plugin()   X-Ref
Test for get_description_from_plugin().


test_generate_preset_xml(array $params, ?string $description)   X-Ref
Test for generate_preset_xml().

param: array $params activity config settings
param: string|null $description preset description

generate_preset_xml_provider()   X-Ref
Data provider for generate_preset_xml().

return: array

test_get_file()   X-Ref
Test for get_file().


test_can_manage()   X-Ref
Test for can_manage().


test_delete()   X-Ref
Test for delete().


test_get_fields()   X-Ref
Test for the get_fields method.


test_get_sample_entries()   X-Ref
Test for the get_sample_entries method.


test_get_template_content()   X-Ref
Test for the get_template_content method.


test_get_fullname()   X-Ref
Test for the get_fullname method.