Skip to content

Commit

Permalink
MDL-60518 core_competency: Set $USER global variable for tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Amaia Anabitarte committed Dec 14, 2018
1 parent b91ddd1 commit 45cc006
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions competency/tests/api_test.php
Original file line number Diff line number Diff line change
Expand Up @@ -2501,6 +2501,10 @@ public function test_add_evidence_user_competency_course_grade_in_course() {
$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);
Expand Down

0 comments on commit 45cc006

Please sign in to comment.