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 401 and 402] [Versions 401 and 403]

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: 652 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.