Commit 4ce6bba9 authored by Tim Hunt's avatar Tim Hunt
Browse files

MDL-47494 gapselect: Fix ddwtos and gapselect unit tests #67

parent dd9ae7a0
......@@ -236,13 +236,13 @@ class qtype_gapselect_question_test extends UnitTestCase {
$gapselect->start_attempt(new question_attempt_step(), 1);
$this->assertEqual(array(
1 => new question_classified_response(1, 'quick', 1),
1 => new question_classified_response(1, 'quick', 1/3),
2 => new question_classified_response(2, 'dog', 0),
3 => new question_classified_response(1, 'lazy', 1),
3 => new question_classified_response(1, 'lazy', 1/3),
), $gapselect->classify_response(array('p1' => '1', 'p2' => '2', 'p3' => '1')));
$this->assertEqual(array(
1 => question_classified_response::no_response(),
2 => new question_classified_response(1, 'fox', 1),
2 => new question_classified_response(1, 'fox', 1/3),
3 => new question_classified_response(2, 'assiduous', 0),
), $gapselect->classify_response(array('p1' => '0', 'p2' => '1', 'p3' => '2')));
}
......
......@@ -129,15 +129,15 @@ class qtype_gapselect_test extends UnitTestCase {
$this->assertEqual(array(
1 => array(
1 => new question_possible_response('quick', 1),
1 => new question_possible_response('quick', 1/3),
2 => new question_possible_response('slow', 0),
null => question_possible_response::no_response()),
2 => array(
1 => new question_possible_response('fox', 1),
1 => new question_possible_response('fox', 1/3),
2 => new question_possible_response('dog', 0),
null => question_possible_response::no_response()),
3 => array(
1 => new question_possible_response('lazy', 1),
1 => new question_possible_response('lazy', 1/3),
2 => new question_possible_response('assiduous', 0),
null => question_possible_response::no_response()),
), $this->qtype->get_possible_responses($q));
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment