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.

(no description)

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

Defines 1 class


Class: manager_test  - X-Ref

Manager tests class for mod_data.

test_create()   X-Ref
Test for static create methods.


test_set_module_viewed()   X-Ref
Test set_module_viewed


test_set_template_viewed()   X-Ref
Test set_template_viewed


test_has_records()   X-Ref
Test for has_records().


test_has_fields()   X-Ref
Test for has_fields().


test_get_available_presets()   X-Ref
Test for get_available_presets().


test_get_available_plugin_presets()   X-Ref
Test for get_available_plugin_presets().


test_get_available_saved_presets()   X-Ref
Test for get_available_saved_presets().


test_can_view_preset(string $rolename, bool $ownpreset, ?bool $useridparam, bool $plugin, bool $expected)   X-Ref
Test for can_view_preset().

param: string $rolename the user role name
param: bool $ownpreset if the preset belongs to the user
param: bool|null $useridparam if the method should be called with a user id param
param: bool $plugin if the preset is a plugin or not
param: bool $expected the expected result

can_view_preset_provider()   X-Ref
Data provider for test_can_view_preset.

return: array

test_can_export_entries()   X-Ref
Test for can_export_entries().


test_reset_all_templates()   X-Ref
No description

test_reset_template(string $templatetoreset, array $expected)   X-Ref
Test reset_template.

param: string $templatetoreset the template to reset
param: string[] $expected the expected templates to be reset

reset_template_provider()   X-Ref
Data provider for test_reset_templatet.

return: array