Lines:
1 to 51 of 51
<?php /** * Testing Ajax handler for erasing personal data. * * @package WordPress\UnitTests * @since 5.2.0 */ /* class Tests_Ajax_PrivacyErasePersonalData */ /* function Tests_Ajax_PrivacyErasePersonalData::wpSetUpBeforeClass() – Create user erase request fixtures. */ /* function Tests_Ajax_PrivacyErasePersonalData::set_up */ /* function Tests_Ajax_PrivacyErasePersonalData::tear_down */ /* function Tests_Ajax_PrivacyErasePersonalData::_set_eraser_callback() – Helper method for changing the test eraser’s callback function. */ /* function Tests_Ajax_PrivacyErasePersonalData::filter_eraser_callback_value() – Change the test eraser callback to a specified value. */ /* function Tests_Ajax_PrivacyErasePersonalData::_unset_eraser_key() – Helper method for unsetting an array index in the test eraser. */ /* function Tests_Ajax_PrivacyErasePersonalData::filter_unset_eraser_index() – Unsets an array key in the test eraser. */ /* function Tests_Ajax_PrivacyErasePersonalData::_unset_response_key() – Helper method for erasing a key from the eraser response. */ /* function Tests_Ajax_PrivacyErasePersonalData::filter_unset_response_index() – Unsets an array index in a response. */ /* function Tests_Ajax_PrivacyErasePersonalData::test_error_when_missing_request_id() – The function should send an error when the request ID is missing. */ /* function Tests_Ajax_PrivacyErasePersonalData::test_error_when_request_id_invalid() – The function should send an error when the request ID is less than 1. */ /* function Tests_Ajax_PrivacyErasePersonalData::test_error_when_current_user_missing_required_capabilities() – The function should send an error when the current user is missing required capabilities. */ /* function Tests_Ajax_PrivacyErasePersonalData::test_error_when_current_user_missing_required_capabilities_multisite() – Test requests do not succeed on multisite when the current user is not a network admin. */ /* function Tests_Ajax_PrivacyErasePersonalData::test_failure_with_invalid_nonce() – The function should send an error when the nonce does not validate. */ /* function Tests_Ajax_PrivacyErasePersonalData::test_error_when_incorrect_request_type() – The function should send an error when the request type is incorrect. */ /* function Tests_Ajax_PrivacyErasePersonalData::test_error_when_invalid_email() – The function should send an error when the request email is invalid. */ /* function Tests_Ajax_PrivacyErasePersonalData::test_error_when_missing_eraser_index() – The function should send an error when the eraser index is missing. */ /* function Tests_Ajax_PrivacyErasePersonalData::test_error_when_missing_page_index() – The function should send an error when the page index is missing. */ /* function Tests_Ajax_PrivacyErasePersonalData::test_error_when_negative_eraser_index() – The function should send an error when the eraser index is negative. */ /* function Tests_Ajax_PrivacyErasePersonalData::test_error_when_eraser_index_out_of_range() – The function should send an error when the eraser index is out of range. */ /* function Tests_Ajax_PrivacyErasePersonalData::test_error_when_page_index_less_than_one() – The function should send an error when the page index is less than one. */ /* function Tests_Ajax_PrivacyErasePersonalData::test_error_when_eraser_not_array() – The function should send an error when an eraser is not an array. */ /* function Tests_Ajax_PrivacyErasePersonalData::test_error_when_eraser_missing_friendly_name() – The function should send an error when an eraser is missing a friendly name. */ /* function Tests_Ajax_PrivacyErasePersonalData::test_error_when_eraser_missing_callback() – The function should send an error when an eraser is missing a callback. */ /* function Tests_Ajax_PrivacyErasePersonalData::test_error_when_eraser_index_invalid_callback() – The function should send an error when an eraser, at a given index, has an invalid callback. */ /* function Tests_Ajax_PrivacyErasePersonalData::test_error_when_eraser_index_invalid_response() – The function should send an error when an eraser, at a given index, is missing an array response. */ /* function Tests_Ajax_PrivacyErasePersonalData::test_error_when_eraser_items_removed_missing() – The function should send an error when missing an items_removed index. */ /* function Tests_Ajax_PrivacyErasePersonalData::test_error_when_eraser_items_retained_missing() – The function should send an error when missing an items_retained index. */ /* function Tests_Ajax_PrivacyErasePersonalData::test_error_when_eraser_messages_missing() – The function should send an error when missing a messages index. */ /* function Tests_Ajax_PrivacyErasePersonalData::test_error_when_eraser_messages_not_array() – The function should send an error when the messages index is not an array. */ /* function Tests_Ajax_PrivacyErasePersonalData::filter_response_messages_invalid() – Change the messages index to an invalid value (not an array). */ /* function Tests_Ajax_PrivacyErasePersonalData::test_error_when_eraser_missing_done_response() – The function should send an error when an eraser is missing ‘done’ in array response. */ /* function Tests_Ajax_PrivacyErasePersonalData::test_success_when_current_user_has_required_capabilities() – The function should successfully send erasers response data when the current user has the required capabilities. */ /* function Tests_Ajax_PrivacyErasePersonalData::test_success_when_no_items_to_erase() – The function should successfully send erasers response data when no items to erase. */ /* function Tests_Ajax_PrivacyErasePersonalData::test_output_should_be_filterable() – Test that the function’s output should be filterable with the `wp_privacy_personal_data_erasure_page` filter. */ /* function Tests_Ajax_PrivacyErasePersonalData::filter_eraser_data_response() – Filters the eraser response. */ /* function Tests_Ajax_PrivacyErasePersonalData::register_custom_personal_data_eraser() – Register handler for a custom personal data eraser. */ /* function Tests_Ajax_PrivacyErasePersonalData::callback_personal_data_eraser() – Custom Personal Data Eraser. */ /* function Tests_Ajax_PrivacyErasePersonalData::_make_ajax_call() – Helper function for ajax handler. */