public function test_summarise_response() { $mc = test_question_maker::make_a_multichoice_multi_question(); $mc->shuffleanswers = false; $mc->start_attempt(new question_attempt_step(), 1); $summary = $mc->summarise_response(array('choice1' => 1, 'choice2' => 1), test_question_maker::get_a_qa($mc)); $this->assertEquals('B; C', $summary); }
public function test_summarise_response() { $mc = test_question_maker::make_a_multichoice_single_question(); $mc->start_attempt(new question_attempt_step(), 1); $summary = $mc->summarise_response($mc->prepare_simulated_post_data(array('answer' => 'A')), test_question_maker::get_a_qa($mc)); $this->assertEquals('A', $summary); }