mirror of
https://github.com/moodle/moodle.git
synced 2025-08-06 17:36:38 +02:00
MDL-60518 core_competency: Set $USER global variable for tests
This commit is contained in:
parent
dd815d254f
commit
7b11b53d51
1 changed files with 4 additions and 0 deletions
|
@ -2501,6 +2501,10 @@ class core_competency_api_testcase extends advanced_testcase {
|
|||
$this->resetAfterTest(true);
|
||||
$dg = $this->getDataGenerator();
|
||||
|
||||
// Create and assign a current user.
|
||||
$currentuser = $dg->create_user();
|
||||
$this->setUser($currentuser);
|
||||
|
||||
// Create a course.
|
||||
$course = $dg->create_course();
|
||||
$record = array('courseid' => $course->id, 'pushratingstouserplans' => false);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue