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 310 and 402] [Versions 310 and 403] [Versions 39 and 310]

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