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 tests for core_favourites.

Copyright: 2018 Jake Dallimore <jrhdallimore@gmail.com>
License: http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
File Size: 305 lines (19 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class


Class: provider_test  - X-Ref

Unit tests for favourites/classes/privacy/provider

setUp()   X-Ref
No description

set_up_courses_and_users()   X-Ref
Helper to set up some sample users and courses.


test_add_contexts_for_userid()   X-Ref
Test confirming that contexts of favourited items can be added to the contextlist.


test_delete_favourites_for_user()   X-Ref
Test deletion of user favourites based on an approved_contextlist and component area.


test_delete_favourites_for_all_users()   X-Ref
No description

test_add_userids_for_context()   X-Ref
Test confirming that user ID's of favourited items can be added to the userlist.


test_delete_favourites_for_userlist()   X-Ref
Test deletion of user favourites based on an approved_userlist, component area and item type.


test_get_favourites_info_for_user()   X-Ref
Test fetching the favourites data for a specified user in a specified component, item type and item ID.