Skip to content

Commit

Permalink
MDL-60950 assign: Update incompatible unit test
Browse files Browse the repository at this point in the history
Maintain compatibility with unit test changes after MDL-55609.
  • Loading branch information
Damyon Wiese committed Jun 19, 2018
1 parent 0877aac commit 8b4346c
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions mod/assign/tests/locallib_test.php
Expand Up @@ -198,11 +198,16 @@ public function test_get_assign_perpage($maxperpage, $userprefs) {
public function test_gradingtable_filter_by_requiresgrading_no_grade() {
global $PAGE;

$this->setUser($this->editingteachers[0]);
$params = array('assignsubmission_onlinetext_enabled' => 1,
'assignfeedback_comments_enabled' => 0,
'grade' => GRADE_TYPE_NONE);
$assign = $this->create_instance($params);
$this->resetAfterTest();

$course = $this->getDataGenerator()->create_course();
$teacher = $this->getDataGenerator()->create_and_enrol($course, 'teacher');
$this->setUser($teacher);
$assign = $this->create_instance($course, [
'assignsubmission_onlinetext_enabled' => 1,
'assignfeedback_comments_enabled' => 0,
'grade' => GRADE_TYPE_NONE
]);

$PAGE->set_url(new moodle_url('/mod/assign/view.php', array(
'id' => $assign->get_course_module()->id,
Expand Down

0 comments on commit 8b4346c

Please sign in to comment.