Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 4.3.x will end 7 October 2024 (12 months).
  • Bug fixes for security issues in 4.3.x will end 21 April 2025 (18 months).
  • PHP version: minimum PHP 8.0.0 Note: minimum PHP version has increased since Moodle 4.1. PHP 8.2.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.