mirror of
https://github.com/moodle/moodle.git
synced 2025-08-06 17:36:38 +02:00
MDL-68757 questions: don't do output in low-level functions
This commit is contained in:
parent
d85118369d
commit
4a45b7112c
7 changed files with 52 additions and 131 deletions
|
@ -1653,11 +1653,8 @@ class core_course_courselib_testcase extends advanced_testcase {
|
|||
case 'quiz':
|
||||
$qgen = $this->getDataGenerator()->get_plugin_generator('core_question');
|
||||
$qcat = $qgen->create_question_category(array('contextid' => $modcontext->id));
|
||||
$questions = array(
|
||||
$qgen->create_question('shortanswer', null, array('category' => $qcat->id)),
|
||||
$qgen->create_question('shortanswer', null, array('category' => $qcat->id)),
|
||||
);
|
||||
$this->expectOutputRegex('/'.get_string('unusedcategorydeleted', 'question').'/');
|
||||
$qgen->create_question('shortanswer', null, array('category' => $qcat->id));
|
||||
$qgen->create_question('shortanswer', null, array('category' => $qcat->id));
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue