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 311] [Versions 310 and 400] [Versions 310 and 401] [Versions 310 and 402] [Versions 310 and 403]

Tests for the event observer.

Copyright: 2018 Mihail Geshoski <mihail@moodle.com>
License: http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
File Size: 207 lines (9 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class


Class: tool_dataprivacy_user_deleted_observer_testcase  - X-Ref

Event observer test.

test_create_delete_data_request()   X-Ref
Ensure that a delete data request is created upon user deletion.


test_create_delete_data_request_automatic_creation_disabled()   X-Ref
Ensure that a delete data request is not created upon user deletion if automatic creation of
delete data requests is disabled.


test_create_delete_data_request_export_data_request_preexists()   X-Ref
Ensure that a delete data request is being created upon user deletion
if an ongoing export data request (or any other except delete data request) for that user already exists.


test_create_delete_data_request_ongoing_delete_data_request_preexists()   X-Ref
Ensure that a delete data request is not being created upon user deletion
if an ongoing delete data request for that user already exists.


test_create_delete_data_request_canceled_delete_data_request_preexists()   X-Ref
Ensure that a delete data request is being created upon user deletion
if a finished delete data request (excluding complete) for that user already exists.


test_create_delete_data_request_completed_delete_data_request_preexists()   X-Ref
Ensure that a delete data request is being created upon user deletion
if a completed delete data request for that user already exists.


trigger_delete_user_event($user)   X-Ref
Helper to trigger and capture the delete user event.

param: object $user The user object.
return: \core\event\user_deleted $event The returned event.