MDL-37506 question code: incorrect preg_quote uses.
[moodle.git] / question / type / truefalse / tests / walkthrough_test.php
index 2e617d2..0a63ad7 100644 (file)
@@ -54,7 +54,7 @@ class qtype_truefalse_walkthrough_test extends qbehaviour_walkthrough_test_base
                         get_string('questiontext', 'question')));
         $this->assertEquals(get_string('false', 'qtype_truefalse'),
                 $this->quba->get_right_answer_summary($this->slot));
-        $this->assertRegExp('/' . preg_quote($tf->questiontext) . '/',
+        $this->assertRegExp('/' . preg_quote($tf->questiontext, '/') . '/',
                 $this->quba->get_question_summary($this->slot));
         $this->assertNull($this->quba->get_response_summary($this->slot));
 
@@ -69,7 +69,7 @@ class qtype_truefalse_walkthrough_test extends qbehaviour_walkthrough_test_base
                 $this->get_contains_tf_false_radio_expectation(false, false),
 
                 // In particular, check that the false feedback is not displayed.
-                new question_no_pattern_expectation('/' . preg_quote($tf->falsefeedback) . '/'));
+                new question_no_pattern_expectation('/' . preg_quote($tf->falsefeedback, '/') . '/'));
 
     }
 }