Merge branch 'MDL-80266-401' of https://github.com/andrewnicols/moodle into MOODLE_401_STABLE

This commit is contained in:
Sara Arjona
2024-01-16 07:20:21 +01:00
+11 -1
View File
@@ -27,7 +27,8 @@
require_once(__DIR__ . '/../../../../lib/behat/behat_base.php');
use Behat\Gherkin\Node\TableNode as TableNode;
use Behat\Gherkin\Node\TableNode;
/**
* Forum-related steps definitions.
*
@@ -37,6 +38,15 @@ use Behat\Gherkin\Node\TableNode as TableNode;
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class behat_mod_forum extends behat_base {
/**
* Reset forum caches between tests.
*
* @BeforeScenario @mod_forum
*/
public function reset_forum_caches(): void {
\mod_forum\subscriptions::reset_discussion_cache();
\mod_forum\subscriptions::reset_forum_cache();
}
/**
* Adds a topic to the forum specified by it's name. Useful for the Announcements and blog-style forums.