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 615fdc5 commit b9e1665
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/input_parsons_test.php
Original file line number Diff line number Diff line change
Expand Up @@ -91,11 +91,11 @@ public function test_validate_parsons_state_input(): void {
$state = $el->validate_student_response(['sans1' => '[[{"used":[[[]]],"available":["aGVsbG8=","d29ybGQ="]},0]]'],
$options, $ta,
new stack_cas_security());
print_r($state);

$this->assertEquals(stack_input::VALID, $state->status);
$this->assertEquals('', $state->note);
$this->assertEquals('', $state->errors);
$this->assertEquals('"[[{\"used\":[[[]]],\"available\":[\"aGVsbG8=\",\"d29ybGQ=\"]},0]]"', $state->contentsmodified);
$this->assertEquals('"[{\"used\":[[[]]],\"available\":[\"aGVsbG8=\",\"d29ybGQ=\"]},0]"', $state->contentsmodified);
$this->assertEquals('\[ \text{[[{"used":[[[]]],"available":'
. '["hello","world"]},0]]} \]', $state->contentsdisplayed);
$this->assertEquals('',
Expand Down Expand Up @@ -193,7 +193,7 @@ 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);
Expand Down

0 comments on commit b9e1665

Please sign in to comment.