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.

Differences Between: [Versions 311 and 402] [Versions 400 and 402] [Versions 401 and 402]

Unit tests for the editor_atto implementation of the privacy API.

Copyright: 2018 Andrew Nicols <andrew@nicols.co.uk>
License: http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
File Size: 655 lines (32 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class


Class: provider_test  - X-Ref

Unit tests for the editor_atto implementation of the privacy API.

test_fetch_and_exports_drafts()   X-Ref
One test to check fetch and export of all drafts.


test_delete_for_all_users_in_context()   X-Ref
Test delete_for_all_users_in_context.


test_delete_for_user_in_contexts()   X-Ref
Test delete_for_all_users_in_context.


test_get_users_in_context()   X-Ref
Test that user data with different contexts is fetched.


test_delete_data_for_users()   X-Ref
Test that data for users in approved userlist is deleted.


test_another_user_edits_you()   X-Ref
Test fetch and delete when another user has editted a draft in your
user context. Edge case.


test_another_you_edit_different_user()   X-Ref
Test fetch and delete when you have edited another user's context.


create_editor_draft(\context $context, $userid, $elementid, $text, $filecount = 0)   X-Ref
Create an editor draft.

param: \context    $context The context to create the draft for.
param: int         $userid The ID to create the draft for.
param: string      $elementid The elementid for the editor.
param: string      $text The text to write.
param: int         $filecount The number of files to create.
return: \stdClass   The editor draft.