Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 3.10.x will end 8 November 2021 (12 months).
  • Bug fixes for security issues in 3.10.x will end 9 May 2022 (18 months).
  • PHP version: minimum PHP 7.2.0 Note: minimum PHP version has increased since Moodle 3.8. PHP 7.3.x and 7.4.x are supported too.

Differences Between: [Versions 310 and 311] [Versions 310 and 400] [Versions 310 and 401] [Versions 310 and 402] [Versions 310 and 403]

mod_h5pactivity generator tests

Copyright: 2020 Ferran Recio <ferran@moodle.com>
License: http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
File Size: 220 lines (10 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

mod_h5pactivity_restore_testcase:: (4 methods):
  setupBeforeClass()
  test_backup_restore()
  backup_restore_data()
  backup_and_restore()


Class: mod_h5pactivity_restore_testcase  - X-Ref

Genarator tests class for mod_h5pactivity.

setupBeforeClass()   X-Ref
Setup to ensure that fixtures are loaded.


test_backup_restore(bool $content, bool $userdata, array $result1, array $result2)   X-Ref
Test on H5P activity backup and restore.

param: bool $content if has to create attempts
param: bool $userdata if backup have userdata
param: array $result1 data to check on original course
param: array $result2 data to check on resotred course

backup_restore_data()   X-Ref
Data provider for test_backup_restore.

return: array

backup_and_restore(stdClass $srccourse, bool $userdata)   X-Ref
Backs a course up and restores it.

param: stdClass $srccourse Course object to backup
param: bool $userdata if the backup must be with user data
return: int ID of newly restored course