MDL-51225 mod_forum: New behat step for creating question discussion

This commit is contained in:
Jun Pataleta
2020-01-17 14:45:50 +08:00
parent 36984d4d1d
commit b92880fd4a
+11
View File
@@ -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_name_string>(?:[^"]|\\")*)" 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.
*