From 02c059c2a9ae1d2b89f55f20d9712560c2f0b4f0 Mon Sep 17 00:00:00 2001 From: Jean-Michel Vedrine Date: Mon, 1 Jan 2018 10:57:51 +0100 Subject: Fix problems in question test --- tests/question_test.php | 8 ++++---- 1 file 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( -- cgit v1.2.3