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 310 and 401] [Versions 39 and 401]

(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