Search moodle.org's
Developer Documentation

See Release Notes
Long Term Support Release

  • Bug fixes for general core bugs in 4.1.x will end 13 November 2023 (12 months).
  • Bug fixes for security issues in 4.1.x will end 10 November 2025 (36 months).
  • PHP version: minimum PHP 7.4.0 Note: minimum PHP version has increased since Moodle 4.0. PHP 8.0.x is supported too.

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

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