Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 4.2.x will end 22 April 2024 (12 months).
  • Bug fixes for security issues in 4.2.x will end 7 October 2024 (18 months).
  • PHP version: minimum PHP 8.0.0 Note: minimum PHP version has increased since Moodle 4.1. PHP 8.1.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.