Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 3.11.x will end 14 Nov 2022 (12 months plus 6 months extension).
  • Bug fixes for security issues in 3.11.x will end 13 Nov 2023 (18 months plus 12 months extension).
  • PHP version: minimum PHP 7.3.0 Note: minimum PHP version has increased since Moodle 3.10. PHP 7.4.x is supported too.

Differences Between: [Versions 310 and 311] [Versions 39 and 311]

(no description)

File Size: 235 lines (8 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 1 file
 admin/tool/dataprivacy/tests/data_privacy_testcase.php

Defines 1 class


Class: data_request_test  - X-Ref

Tests for the data_request persistent.

status_state_provider()   X-Ref
Data provider for testing is_resettable, and is_active.

return: array

test_pseudo_states_export(int $status, bool $resettable, bool $active)   X-Ref
Test the pseudo states of a data request with an export request.

param: int     $status
param: bool    $resettable
param: bool    $active

test_pseudo_states_delete(int $status, bool $resettable, bool $active)   X-Ref
Test the pseudo states of a data request with a delete request.

param: int     $status
param: bool    $resettable
param: bool    $active

test_can_reset_others($status)   X-Ref
Test the pseudo states of a data request.

param: int     $status

non_resettable_provider()   X-Ref
Data provider for states which are not resettable.

return: array

test_non_resubmit_request($status)   X-Ref
Ensure that requests which are not resettable cause an exception to be thrown.

param: int     $status

test_resubmit_request()   X-Ref
Ensure that a rejected request can be reset.


test_resubmit_active_request()   X-Ref
Ensure that an active request can be reset.


create_request_for_user_with_status(int $userid, int $type, int $status)   X-Ref
Create a data request for the user.

param: int     $userid
param: int     $type
param: int     $status
return: data_request