Skip to content

Commit

Permalink
Fix some parsons tests
Browse files Browse the repository at this point in the history
  • Loading branch information
smmercuri committed Feb 7, 2025
1 parent b9e1665 commit 5a9cfc9
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions tests/input_parsons_test.php
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,7 @@ public function test_validate_parsons_state_input(): void {
$this->assertEquals('', $state->note);
$this->assertEquals('', $state->errors);
$this->assertEquals('"[{\"used\":[[[]]],\"available\":[\"aGVsbG8=\",\"d29ybGQ=\"]},0]"', $state->contentsmodified);
$this->assertEquals('\[ \text{[[{"used":[[[]]],"available":'
. '["hello","world"]},0]]} \]', $state->contentsdisplayed);
$this->assertEquals('\[ \text{[{"used":[[[]]],"available":["hello","world"]},0]} \]', $state->contentsdisplayed);
$this->assertEquals('',
$el->get_teacher_answer_display($state->contentsmodified, $state->contentsdisplayed));
$expected = 'sana1: "[[{\\"used\\":[[[]]],\\"available\\":[\\"hello\\",\\"world\\"]},0]]" [valid]';
Expand Down Expand Up @@ -193,10 +192,10 @@ public function test_validate_parsons_whitespace(): void {
$state = $el->validate_student_response(['sans1' => ' [[{"used":[[[]]],"available":["aGVsbG8=","d29ybGQ="]},0]] '],
$options, $ta, new stack_cas_security());
$this->assertEquals(stack_input::VALID, $state->status);
$this->assertEquals('" [{\"used\":[[[]]],\"available\":[\"aGVsbG8=\",\"d29ybGQ=\"]},0] "',
$this->assertEquals('"[{\"used\":[[[]]],\"available\":[\"aGVsbG8=\",\"d29ybGQ=\"]},0]"',
$state->contentsmodified);
$this->assertEquals('\[ \text{[[{"used":[[[]]],"available":'
. '["hello","world"]},0]]} \]', $state->contentsdisplayed);
$this->assertEquals('\[ \text{[{"used":[[[]]],"available":'
. '["hello","world"]},0]} \]', $state->contentsdisplayed);
}

public function test_validate_parsons_empty(): void {
Expand Down

0 comments on commit 5a9cfc9

Please sign in to comment.