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 39 and 310]

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: 304 lines (18 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class


Class: privacy_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.