See Release Notes
Long Term Support Release
Differences Between: [Versions 39 and 310] [Versions 39 and 311] [Versions 39 and 400] [Versions 39 and 401] [Versions 39 and 402] [Versions 39 and 403]
PHPUnit tests for backup and restore functionality.
Author: | Dmitrii Metelkin <dmitriim@catalyst-au.net> |
Copyright: | 2020 Catalyst IT |
License: | http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later |
File Size: | 291 lines (11 kb) |
Included or required: | 0 times |
Referenced: | 0 times |
Includes or requires: | 1 file mod/quiz/accessrule/seb/tests/test_helper_trait.php |
quizaccess_seb_backup_restore_testcase:: (14 methods):
setUp()
create_quiz_with_template()
backup_and_restore_quiz()
backup_quiz()
restore_quiz()
change_site()
validate_backup_restore()
test_backup_restore_no_seb()
test_backup_restore_manual_config()
test_backup_restore_template_config()
test_backup_restore_uploaded_config()
test_restore_template_to_a_different_site_when_the_same_template_exists()
test_restore_template_to_a_different_site_when_the_same_content_but_different_name()
test_restore_template_to_a_different_site_when_the_same_name_but_different_content()
Class: quizaccess_seb_backup_restore_testcase - X-Ref
PHPUnit tests for backup and restore functionality.setUp() X-Ref |
Called before every test. |
create_quiz_with_template() X-Ref |
A helper method to create a quiz with template usage of SEB. return: \quizaccess_seb\quiz_settings |
backup_and_restore_quiz() X-Ref |
A helper method to emulate backup and restore of the quiz. return: \cm_info|null |
backup_quiz() X-Ref |
A helper method to backup test quiz. return: mixed A backup ID ready to be restored. |
restore_quiz($backupid) X-Ref |
A helper method to restore provided backup. param: string $backupid Backup ID to restore. |
change_site() X-Ref |
A helper method to emulate restoring to a different site. |
validate_backup_restore(cm_info $newcm) X-Ref |
A helper method to validate backup and restore results. param: cm_info $newcm Restored course_module object. |
test_backup_restore_no_seb() X-Ref |
Test backup and restore when no seb. |
test_backup_restore_manual_config() X-Ref |
Test backup and restore when manually configured. |
test_backup_restore_template_config() X-Ref |
Test backup and restore when using template. |
test_backup_restore_uploaded_config() X-Ref |
Test backup and restore when using uploaded file. |
test_restore_template_to_a_different_site_when_the_same_template_exists() X-Ref |
No new template should be restored if restoring to a different site, but the template with the same name and content exists.. |
test_restore_template_to_a_different_site_when_the_same_content_but_different_name() X-Ref |
A new template should be restored if restoring to a different site, but existing template has the same content, but different name. |
test_restore_template_to_a_different_site_when_the_same_name_but_different_content() X-Ref |
A new template should be restored if restoring to a different site, but existing template has the same name, but different content. |