diff --git a/mod/quiz/tests/backup/repeated_restore_test.php b/mod/quiz/tests/backup/repeated_restore_test.php index 8a65551d4ae..86be7538eef 100644 --- a/mod/quiz/tests/backup/repeated_restore_test.php +++ b/mod/quiz/tests/backup/repeated_restore_test.php @@ -550,6 +550,11 @@ final class repeated_restore_test extends advanced_testcase { "Cannot test edited answers for qtype_{$qtype} as it does not use answers.", ); } + if ($DB->count_records('question_answers') === 0) { + $this->markTestSkipped( + "Cannot test edited answers for qtype_{$qtype} as it does not use the question_answers table.", + ); + } foreach ($question2data->options->answers as $answer) { $answer->answer = 'New answer ' . $answer->id; $DB->update_record('question_answers', $answer);