Differences Between: [Versions 311 and 402] [Versions 311 and 403]
Unit tests for the block_html 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: | 438 lines (15 kb) |
Included or required: | 0 times |
Referenced: | 0 times |
Includes or requires: | 0 files |
provider_test:: (14 methods):
get_format_options()
create_user_block()
create_course_block()
create_block()
get_last_block_on_page()
construct_user_page()
construct_course_page()
test_user_block()
test_user_block_unconfigured()
test_user_multiple_blocks_exported()
test_course_blocks_not_exported()
test_mixed_multiple_blocks_exported()
test_get_users_in_context()
test_delete_data_for_users()
Class: provider_test - X-Ref
Unit tests for the block_html implementation of the privacy API.get_format_options() X-Ref |
Get the list of standard format options for comparison. return: \stdClass |
create_user_block($title, $body, $format) X-Ref |
Creates an HTML block on a user. param: string $title param: string $body param: string $format return: \block_instance |
create_course_block($course, $title, $body, $format) X-Ref |
Creates an HTML block on a course. param: \stdClass $course param: string $title param: string $body param: string $format return: \block_instance |
create_block($page) X-Ref |
Creates an HTML block on a page. param: \page $page Page |
get_last_block_on_page($page) X-Ref |
Get the last block on the page. param: \page $page Page return: \block_html Block instance object |
construct_user_page(\stdClass $user) X-Ref |
Constructs a Page object for the User Dashboard. param: \stdClass $user User to create Dashboard for. return: \moodle_page |
construct_course_page(\stdClass $course) X-Ref |
Constructs a Page object for the User Dashboard. param: \stdClass $course Course to create Dashboard for. return: \moodle_page |
test_user_block() X-Ref |
Test that a block on the dashboard is exported. |
test_user_block_unconfigured() X-Ref |
Test that a block on the dashboard which is not configured is _not_ exported. |
test_user_multiple_blocks_exported() X-Ref |
Test that a block on the dashboard is exported. |
test_course_blocks_not_exported() X-Ref |
Test that a block on the dashboard is not exported. |
test_mixed_multiple_blocks_exported() X-Ref |
Test that a block on the dashboard is exported. |
test_get_users_in_context() X-Ref |
Test that only users with a user context HTML block are fetched. |
test_delete_data_for_users() X-Ref |
Test that data for users in approved userlist is deleted. |