Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix unit test of plots within the radio input type. #7

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading