diff options
author | Jean-Michel Vedrine <vedrine@vedrine.org> | 2018-01-01 10:57:51 +0100 |
---|---|---|
committer | Jean-Michel Vedrine <vedrine@vedrine.org> | 2018-01-01 10:57:51 +0100 |
commit | 02c059c2a9ae1d2b89f55f20d9712560c2f0b4f0 (patch) | |
tree | 6d77890c8049f602af2888a9f535b2ff2d9b9668 /tests | |
parent | bd11bbfb8adb703e657fb9ab211ddd01ce6d9012 (diff) |
Fix problems in question test
Diffstat (limited to 'tests')
-rw-r--r-- | tests/question_test.php | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/question_test.php b/tests/question_test.php index 051044b..91a6e23 100644 --- a/tests/question_test.php +++ b/tests/question_test.php @@ -63,15 +63,15 @@ class qtype_algebra_question_test extends advanced_testcase { $this->assertEquals(array(0, question_state::$gradedwrong), $question->grade_response(array('answer' => '0'))); $this->assertEquals(array(0, question_state::$gradedwrong), - $question->grade_response(array('answer' => '5'))); + $question->grade_response(array('answer' => '5*x'))); $this->assertEquals(array(1, question_state::$gradedright), - $question->grade_response(array('answer' => '7'))); + $question->grade_response(array('answer' => '7*x'))); } public function test_grading_test1() { $question = $this->get_test_algebra_question('derive'); - $this->assertEquals(array(0, question_state::$gradedwrong), + $this->assertEquals(array(0.2, question_state::$gradedpartial), $question->grade_response(array('answer' => 'x'))); $this->assertEquals(array(0, question_state::$gradedwrong), $question->grade_response(array('answer' => '0'))); @@ -100,7 +100,7 @@ class qtype_algebra_question_test extends advanced_testcase { } public function test_classify_response() { - $question = test_question_maker::make_question('derive'); + $question = $this->get_test_algebra_question('derive'); $question->start_attempt(new question_attempt_step(), 1); $this->assertEquals(array( |