Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 3.11.x will end 14 Nov 2022 (12 months plus 6 months extension).
  • Bug fixes for security issues in 3.11.x will end 13 Nov 2023 (18 months plus 12 months extension).
  • PHP version: minimum PHP 7.3.0 Note: minimum PHP version has increased since Moodle 3.10. PHP 7.4.x is supported too.

Backup restore base tests.

Copyright: Tomo Tsuyuki <tomotsuyuki@catalyst-au.net>
License: http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
File Size: 123 lines (4 kb)
Included or required: 1 time
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

core_backup_backup_restore_base_testcase:: (4 methods):
  setUp()
  perform_backup()
  perform_restore()
  perform_import()


Class: core_backup_backup_restore_base_testcase  - X-Ref

Basic testcase class for backup / restore functionality.

setUp()   X-Ref
Setup test data.


perform_backup($course)   X-Ref
Backup the course by general mode.

param: stdClass $course Course for backup.
return: string Hash string ID from the backup.

perform_restore($backupid, $course)   X-Ref
Restore from backupid to course.

param: string   $backupid Hash string ID from backup.
param: stdClass $course Course which is restored for.

perform_import($course1, $course2)   X-Ref
Import course from course1 to course2.

param: stdClass $course1 Course to be backuped up.
param: stdClass $course2 Course to be restored.