Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 3.11.x will end 14 Nov 2022 (12 months plus 6 months extension).
  • Bug fixes for security issues in 3.11.x will end 13 Nov 2023 (18 months plus 12 months extension).
  • PHP version: minimum PHP 7.3.0 Note: minimum PHP version has increased since Moodle 3.10. PHP 7.4.x is supported too.

Privacy test for the event monitor

Copyright: 2018 Adrian Greeve
License: http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
File Size: 417 lines (18 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class


Class: provider_test  - X-Ref

Privacy test for the event monitor

setUp()   X-Ref
Set up method.


assign_user_capability($capability, $contextid, $roleid = null)   X-Ref
Assign a capability to $USER
The function creates a student $USER if $USER->id is empty

param: string $capability capability name
param: int $contextid
param: int $roleid
return: int the role id - mainly returned for creation, so calling function can reuse it

test_get_metadata()   X-Ref
Test that a collection with data is returned when calling this function.


test_get_contexts_for_userid()   X-Ref
Check that a user context is returned if there is any user data for this user.


test_get_users_in_context()   X-Ref
Check that the correct userlist is returned if there is any user data for this context.


test_export_user_data()   X-Ref
Test that user data is exported correctly.


test_delete_data_for_all_users_in_context()   X-Ref
Test deleting all user data for a specific context.


test_delete_data_for_user()   X-Ref
This should work identical to the above test.


test_delete_data_for_users()   X-Ref
Test deleting user data for an approved userlist in a context.