MDL-65033 mod_forum: Fix up the unit tests

This commit is contained in:
Peter 2019-03-20 12:46:53 +08:00 committed by Peter
parent bf20111664
commit 27ca632f5d

View File

@ -78,6 +78,7 @@ class mod_forum_vaults_discussion_list_testcase extends advanced_testcase {
$datagenerator = $this->getDataGenerator();
$vault = $this->vault;
$user = $datagenerator->create_user();
self::setUser($user);
$course = $datagenerator->create_course();
$forum = $datagenerator->create_module('forum', ['course' => $course->id]);
@ -127,6 +128,7 @@ class mod_forum_vaults_discussion_list_testcase extends advanced_testcase {
$datagenerator = $this->getDataGenerator();
$vault = $this->vault;
$user = $datagenerator->create_user();
self::setUser($user);
$course = $datagenerator->create_course();
$forum = $datagenerator->create_module('forum', ['course' => $course->id]);
@ -231,6 +233,7 @@ class mod_forum_vaults_discussion_list_testcase extends advanced_testcase {
$datagenerator = $this->getDataGenerator();
$vault = $this->vault;
$user = $datagenerator->create_user();
self::setUser($user);
$course = $datagenerator->create_course();
$forum = $datagenerator->create_module('forum', ['course' => $course->id]);