Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 4.2.x will end 22 April 2024 (12 months).
  • Bug fixes for security issues in 4.2.x will end 7 October 2024 (18 months).
  • PHP version: minimum PHP 8.0.0 Note: minimum PHP version has increased since Moodle 4.1. PHP 8.1.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.