Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 4.0.x will end 8 May 2023 (12 months).
  • Bug fixes for security issues in 4.0.x will end 13 November 2023 (18 months).
  • PHP version: minimum PHP 7.3.0 Note: the minimum PHP version has increased since Moodle 3.10. PHP 7.4.x is also supported.

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.

return: string Hash string ID from the backup.
param: stdClass $course Course for 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.