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.

Differences Between: [Versions 400 and 402] [Versions 401 and 402]

(no description)

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

Defines 1 class


Class: manager_test  - X-Ref

Tests for the manager class.

test_manager_get_site_settings()   X-Ref
Test the behaviour of protected get_site_settings method.


test_manager_get_setting()   X-Ref
Test the behaviour of protected get_setting method.


test_apply_preset_unexisting_preset()   X-Ref
Test the behaviour of apply_preset() method when the given presetid doesn't exist.


test_apply_preset()   X-Ref
Test the behaviour of apply_preset() method.


test_export_preset(bool $includesensible = false, string $presetname = 'Export 1')   X-Ref
Test the behaviour of export_preset() method.

param: bool $includesensible Whether the sensible settings should be exported too or not.
param: string $presetname Preset name.

export_preset_provider()   X-Ref
Data provider for test_export_preset().

return: array

test_download_unexisting_preset()   X-Ref
Test the behaviour of download_preset() method, when the given presetid doesn't exist.


test_import_preset(string $filecontents, bool $expectedpreset, bool $expectedsettings = false,bool $expectedplugins = false, bool $expecteddebugging = false, string $expectedexception = null,string $expectedpresetname = 'Imported preset')   X-Ref
Test the behaviour of import_preset() method.

param: string $filecontents File content to import.
param: bool $expectedpreset Whether the preset should be created or not.
param: bool $expectedsettings Whether settings will be created or not.
param: bool $expectedplugins Whether plugins will be created or not.
param: bool $expecteddebugging Whether debugging message will be thrown or not.
param: string|null $expectedexception Expected exception class (if that's the case).
param: string|null $expectedpresetname Expected preset name.

import_preset_provider()   X-Ref
Data provider for test_import_preset().

return: array

test_delete_preset_unexisting_preset()   X-Ref
Test the behaviour of delete_preset() method when the preset id doesn't exist.


test_delete_preset()   X-Ref
Test the behaviour of delete_preset() method.


test_revert_preset_unexisting_presetapp()   X-Ref
Test the behaviour of revert_preset() method when the preset applied id doesn't exist.


test_revert_preset()   X-Ref
Test the behaviour of revert_preset() method.