See Release Notes
Long Term Support Release
Differences Between: [Versions 39 and 401]
Restore dates test case.
Copyright: | 2017 onwards Ankit Agarwal |
License: | http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later |
File Size: | 163 lines (5 kb) |
Included or required: | 0 times |
Referenced: | 0 times |
Includes or requires: | 0 files |
restore_date_testcase:: (6 methods):
setUp()
backup_and_restore()
create_course_and_module()
assertFieldsNotRolledForward()
assertFieldsRolledForward()
get_diff()
Class: restore_date_testcase - X-Ref
Advanced PHPUnit test case customised for testing restore dates in Moodle.setUp() X-Ref |
Setup. |
backup_and_restore($course, $newdate = 0) X-Ref |
Backs a course up and restores it. param: stdClass $course Course object to backup param: int $newdate If non-zero, specifies custom date for new course return: int ID of newly restored course |
create_course_and_module($modulename, $record = []) X-Ref |
Helper method to create a course and a module. param: string $modulename param: array|stdClass $record return: array |
assertFieldsNotRolledForward($oldinstance, $newinstance, $props) X-Ref |
Verify that the given properties are not rolled. param: stdClass $oldinstance param: stdClass $newinstance param: [] $props |
assertFieldsRolledForward($oldinstance, $newinstance, $props) X-Ref |
Verify that the given properties are rolled. param: stdClass $oldinstance param: stdClass $newinstance param: [] $props |
get_diff() X-Ref |
Get time diff between start date and restore date in seconds. return: mixed |