Permalink
Browse files

MDL-39507 qtype_essay: hacky fix for unit tests

This is just to get the tests passing for integration purposes. Tim
may want to do a robust fix and revert this.
  • Loading branch information...
danpoltawski committed Aug 13, 2013
1 parent 969de2a commit ed0724271388f293033663fd96d491fa7e1f5f9b
@@ -56,7 +56,7 @@ public function test_manual_graded_essay() {
$this->get_does_not_contain_feedback_expectation());
// Simulate some data submitted by the student.
$this->process_submission(array('answer' => 'This is my wonderful essay!'));
$this->process_submission(array('answer' => 'This is my wonderful essay!', 'answerformat' => FORMAT_PLAIN));
// Verify.
$this->check_current_state(question_state::$complete);
@@ -68,7 +68,7 @@ public function test_manual_graded_essay() {
// Process the same data again, check it does not create a new step.
$numsteps = $this->get_step_count();
$this->process_submission(array('answer' => 'This is my wonderful essay!'));
$this->process_submission(array('answer' => 'This is my wonderful essay!', 'answerformat' => FORMAT_PLAIN));
$this->check_step_count($numsteps);
// Process different data, check it creates a new step.
@@ -77,7 +77,7 @@ public function test_manual_graded_essay() {
$this->check_current_state(question_state::$todo);
// Change back, check it creates a new step.
$this->process_submission(array('answer' => 'This is my wonderful essay!'));
$this->process_submission(array('answer' => 'This is my wonderful essay!', 'answerformat' => FORMAT_PLAIN));
$this->check_step_count($numsteps + 2);
// Finish the attempt.
@@ -206,7 +206,7 @@ public function test_manual_graded_ignore_repeat_sumbission() {
$this->check_current_mark(null);
// Simulate some data submitted by the student.
$this->process_submission(array('answer' => 'This is my wonderful essay!'));
$this->process_submission(array('answer' => 'This is my wonderful essay!', 'answerformat' => FORMAT_PLAIN));
// Verify.
$this->check_current_state(question_state::$complete);
@@ -283,7 +283,7 @@ public function test_manual_graded_essay_can_grade_0() {
$this->get_does_not_contain_feedback_expectation());
// Simulate some data submitted by the student.
$this->process_submission(array('answer' => 'This is my wonderful essay!'));
$this->process_submission(array('answer' => 'This is my wonderful essay!', 'answerformat' => FORMAT_PLAIN));
// Verify.
$this->check_current_state(question_state::$complete);
@@ -47,7 +47,7 @@ public function test_summarise_response() {
$longstring = str_repeat('0123456789', 50);
$essay = test_question_maker::make_an_essay_question();
$this->assertEquals($longstring,
$essay->summarise_response(array('answer' => $longstring)));
$essay->summarise_response(array('answer' => $longstring, 'answerformat' => FORMAT_PLAIN)));
}
public function test_is_same_response() {

0 comments on commit ed07242

Please sign in to comment.