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.

Differences Between: [Versions 310 and 311] [Versions 310 and 400] [Versions 310 and 401] [Versions 310 and 402] [Versions 310 and 403]

Collection unit tests.

Copyright: 2018 Andrew Nicols <andrew@nicols.co.uk>
License: http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
File Size: 228 lines (7 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class


Class: core_privacy_metadata_collection  - X-Ref

Tests for the \core_privacy API's collection functionality.

test_add_type_generic_type()   X-Ref
Test that adding an unknown type causes the type to be added to the collection.


test_add_type_known_type()   X-Ref
Test that adding a known type works as anticipated.


test_add_type_multiple()   X-Ref
Test that adding multiple types returns them all.


test_add_database_table()   X-Ref
Test that the add_database_table function adds a database table.


test_add_user_preference()   X-Ref
Test that the add_user_preference function adds a single user preference.


test_link_external_location()   X-Ref
Test that the link_external_location function links an external location.


test_link_subsystem()   X-Ref
Test that the link_subsystem function links the subsystem.


test_link_plugintype()   X-Ref
Test that the link_plugintype function links the plugin.


component_list_provider()   X-Ref
Data provider to supply a list of valid components.

return: array

test_get_component($component)   X-Ref
Test that we can get the component correctly.

The component will be used for string translations.

param: string  $component The component to test