Skip to content

Commit da70e42

Browse files
committed
api-nrw - Code tidy
1 parent 6cd3abe commit da70e42

2 files changed

Lines changed: 8 additions & 4 deletions

File tree

tests/api_controller_test.php

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,10 @@ public function test_grade(): void {
246246
$this->assertEquals('<p>[[feedback:prt1]]</p>', $this->output->specificfeedback);
247247
$this->assertStringContainsString('correct', $this->output->prts->prt1);
248248
$this->assertEquals(0, count((array)$this->output->gradingassets));
249-
$this->assertEquals('Seed: 86; ans1: matrix([35,30],[28,24]) [score]; prt1: # = 1 | | 1-0-T', $this->output->responsesummary);
249+
$this->assertEquals(
250+
'Seed: 86; ans1: matrix([35,30],[28,24]) [score]; prt1: # = 1 | | 1-0-T',
251+
$this->output->responsesummary
252+
);
250253
$this->assertEquals(0, count($this->output->iframes));
251254
}
252255

@@ -362,10 +365,10 @@ public function test_grade_scores(): void {
362365
$this->assertEquals(10, $this->output->scoreweights->total);
363366
$this->assertEquals(
364367
'Seed: -1; ans1: c [score]; ans2: 1 [score]; ans3: 0 [score]; ans4: 0 [score]; prt1: # = 1 | prt1-1-T; ' .
365-
'prt2: # = 1 | prt2-1-T; prt3: # = 0 | prt3-1-F; prt4: # = 1 | prt4-1-T',
368+
'prt2: # = 1 | prt2-1-T; prt3: # = 0 | prt3-1-F; prt4: # = 1 | prt4-1-T',
366369
$this->output->responsesummary
367370
);
368-
}
371+
}
369372

370373
public function test_download(): void {
371374

tests/fixtures/apifixtures.class.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2182,7 +2182,8 @@ class stack_api_test_data {
21822182
'multipleprts_some' => '{"ans1": "x^3", "ans2": "*", "ans1_val": "x^3", "ans2_val": "*", "ans3": "", "ans4": "true"}',
21832183
'matrices_correct' => '{"ans1_sub_0_0": "35", "ans1_sub_0_1": "30", "ans1_sub_1_0": "28", "ans1_sub_1_1": "24", ' .
21842184
'"ans1_val": "matrix([35,30],[28,24])"}',
2185-
'multiple_mixed' => '{"ans1": "3", "ans2": "1", "ans3": "0", "ans4": "0", "ans2_val": "1", "ans3_val": "0", "ans4_val": "0"}',
2185+
'multiple_mixed' => '{"ans1": "3", "ans2": "1", "ans3": "0", "ans4": "0", ' .
2186+
'"ans2_val": "1", "ans3_val": "0", "ans4_val": "0"}',
21862187
'empty' => '{"ans1": "1", "ans1_val": "1"}',
21872188
];
21882189

0 commit comments

Comments
 (0)