diff --git a/mod/forum/tests/behat/behat_mod_forum.php b/mod/forum/tests/behat/behat_mod_forum.php index 6dfdb7e6be2..78c3e6713fb 100644 --- a/mod/forum/tests/behat/behat_mod_forum.php +++ b/mod/forum/tests/behat/behat_mod_forum.php @@ -49,6 +49,17 @@ class behat_mod_forum extends behat_base { $this->add_new_discussion($forumname, $table, get_string('addanewtopic', 'forum')); } + /** + * Adds a Q&A discussion to the Q&A-type forum specified by it's name with the provided table data. + * + * @Given /^I add a new question to "(?P(?:[^"]|\\")*)" forum with:$/ + * @param string $forumname + * @param TableNode $table + */ + public function i_add_a_new_question_to_forum_with($forumname, TableNode $table) { + $this->add_new_discussion($forumname, $table, get_string('addanewquestion', 'forum')); + } + /** * Adds a discussion to the forum specified by it's name with the provided table data (usually Subject and Message). The step begins from the forum's course page. *