Skip to content

Commit

Permalink
Fix unit test of plots within the radio input type.
Browse files Browse the repository at this point in the history
  • Loading branch information
sangwinc authored and dmitriim committed Apr 28, 2024
1 parent 6eb78a1 commit 0fd4cf0
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tests/input_radio_test.php
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,9 @@ public function test_radio_plots() {
// @codingStandardsIgnoreEnd
$render = $el->render(new stack_input_state(
stack_input::SCORE, array('2'), '', '', '', '', ''), 'stack1__ans1', false, null);
$this->assertTrue(is_int(strpos($render, "<img src='https://www.example.com/moodle/question/type/stack/plot.php")));
// We don't test for the < at the start of the img tag as this is now protected as &lt; in the render.
// However, the plot system does not use the LaTeX.
$this->assertTrue(is_int(strpos($render, "img src='https://www.example.com/moodle/question/type/stack/plot.php")));
$this->assertTrue(is_int(strpos($render,
"alt='STACK auto-generated plot of x with parameters [[x,-2,2],[y,-3,3]]'")));
$this->assertTrue(is_int(strpos($render,
Expand Down

0 comments on commit 0fd4cf0

Please sign in to comment.