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.

Differences Between: [Versions 311 and 402] [Versions 311 and 403] [Versions 39 and 311]

Testcase for providers implementing parts of the core_privacy subsystem.

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

Defines 1 class


Class: provider_testcase  - X-Ref

Testcase for providers implementing parts of the core_privacy subsystem.

tearDown()   X-Ref
Test tearDown.


get_contexts_for_userid(int $userid, string $component)   X-Ref
Export all data for a component for the specified user.

param: int         $userid     The userid of the user to fetch.
param: string      $component  The component to get context data for.
return: \core_privacy\local\request\contextlist

export_all_data_for_user(int $userid, string $component)   X-Ref
Export all data for a component for the specified user.

param: int         $userid     The userid of the user to fetch.
param: string      $component  The component to get export data for.

export_context_data_for_user(int $userid, \context $context, string $component)   X-Ref
Export all daa within a context for a component for the specified user.

param: int         $userid     The userid of the user to fetch.
param: \context    $context    The context to export data for.
param: string      $component  The component to get export data for.

get_provider_classname($component)   X-Ref
Determine the classname and ensure that it is a provider.

param: string      $component      The classname.
return: string