Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions tests/event_handlers_test.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@

use core\event\course_created;
use core\event\course_updated;
use core\event\course_restored;
use core\event\course_section_created;
use core\event\course_section_updated;
use core\event\course_module_created;
Expand Down Expand Up @@ -328,8 +327,12 @@ public function test_course_restored() {
$formdata->role_5 = 5;

// Create the course copy records and associated ad-hoc task.
$coursecopy = new \core_backup\copy\copy($formdata);
$coursecopy->create_copy();
try {
$copydata = \copy_helper::process_formdata($formdata);
\copy_helper::create_copy($copydata);
} catch (\moodle_exception $e) {
throw new moodle_exception('copyformfail', 'backup');
}

// We are expecting trace output during this test, caused by the copy task.
$this->expectOutputRegex("/{$course->id}/");
Expand Down