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.

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