Skip to content

Commit

Permalink
Merge branch 'MDL-80266-402' of https://github.com/andrewnicols/moodle
Browse files Browse the repository at this point in the history
…into MOODLE_402_STABLE
  • Loading branch information
sarjona committed Jan 16, 2024
2 parents 0852082 + 0a06809 commit 59d66f6
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion mod/forum/tests/behat/behat_mod_forum.php
Expand Up @@ -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.
*
Expand All @@ -37,6 +38,15 @@
* @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.
Expand Down

0 comments on commit 59d66f6

Please sign in to comment.