Search moodle.org's
Developer Documentation

See Release Notes
Long Term Support Release

  • Bug fixes for general core bugs in 3.9.x will end* 10 May 2021 (12 months).
  • Bug fixes for security issues in 3.9.x will end* 8 May 2023 (36 months).
  • PHP version: minimum PHP 7.2.0 Note: minimum PHP version has increased since Moodle 3.8. PHP 7.3.x and 7.4.x are supported too.

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: 651 lines (32 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class


Class: editor_atto_privacy_testcase  - 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.