MDL-20636 truefalse qtype clean up other unit tests to use the new way of making test tf questions.
This commit is contained in:
@@ -39,21 +39,21 @@ require_once(dirname(__FILE__) . '/../behaviour.php');
|
||||
*/
|
||||
class qbehaviour_missing_test extends UnitTestCase {
|
||||
public function test_missing_cannot_start() {
|
||||
$qa = new question_attempt(test_question_maker::make_a_truefalse_question(), 0);
|
||||
$qa = new question_attempt(test_question_maker::make_question('truefalse', 'true'), 0);
|
||||
$behaviour = new qbehaviour_missing($qa, 'deferredfeedback');
|
||||
$this->expectException();
|
||||
$behaviour->init_first_step(new question_attempt_step(array()), 1);
|
||||
}
|
||||
|
||||
public function test_missing_cannot_process() {
|
||||
$qa = new question_attempt(test_question_maker::make_a_truefalse_question(), 0);
|
||||
$qa = new question_attempt(test_question_maker::make_question('truefalse', 'true'), 0);
|
||||
$behaviour = new qbehaviour_missing($qa, 'deferredfeedback');
|
||||
$this->expectException();
|
||||
$behaviour->process_action(new question_attempt_pending_step(array()));
|
||||
}
|
||||
|
||||
public function test_missing_cannot_get_min_grade() {
|
||||
$qa = new question_attempt(test_question_maker::make_a_truefalse_question(), 0);
|
||||
$qa = new question_attempt(test_question_maker::make_question('truefalse', 'true'), 0);
|
||||
$behaviour = new qbehaviour_missing($qa, 'deferredfeedback');
|
||||
$this->expectException();
|
||||
$behaviour->get_min_fraction();
|
||||
@@ -74,7 +74,7 @@ class qbehaviour_missing_test extends UnitTestCase {
|
||||
1256233790, 2, 1, 'complete', 0.50, 1256233705, 1, 'choice0', '1'),
|
||||
));
|
||||
|
||||
$question = test_question_maker::make_a_truefalse_question();
|
||||
$question = test_question_maker::make_question('truefalse', 'true');
|
||||
$question->id = -1;
|
||||
|
||||
question_bank::start_unit_test();
|
||||
|
||||
Reference in New Issue
Block a user