From 3efe930987673126da015d7492c654cef6baf6a9 Mon Sep 17 00:00:00 2001 From: Damyon Wiese Date: Wed, 5 Mar 2014 12:21:27 +0800 Subject: [PATCH] MDL-43930 Assign: Fix unit tests. The tests were expecting exact log data to match, I changed the data but missed updating the test. --- mod/assign/tests/locallib_test.php | 30 ++++++++++-------------------- 1 file changed, 10 insertions(+), 20 deletions(-) diff --git a/mod/assign/tests/locallib_test.php b/mod/assign/tests/locallib_test.php index 33a6a5ff9a2..5a794b44963 100644 --- a/mod/assign/tests/locallib_test.php +++ b/mod/assign/tests/locallib_test.php @@ -1135,8 +1135,7 @@ class mod_assign_locallib_testcase extends mod_assign_base_testcase { 'grant extension', 'view.php?id=' . $assign->get_course_module()->id, $this->students[0]->id, - $assign->get_course_module()->id, - $this->editingteachers[0]->id + $assign->get_course_module()->id ); $this->assertEventLegacyLogData($expected, $event); $sink->close(); @@ -1165,8 +1164,7 @@ class mod_assign_locallib_testcase extends mod_assign_base_testcase { 'view.php?id=' . $assign->get_course_module()->id, get_string('locksubmissionforstudent', 'assign', array('id' => $this->students[0]->id, 'fullname' => fullname($this->students[0]))), - $assign->get_course_module()->id, - $this->editingteachers[0]->id + $assign->get_course_module()->id ); $this->assertEventLegacyLogData($expected, $event); $sink->close(); @@ -1196,8 +1194,7 @@ class mod_assign_locallib_testcase extends mod_assign_base_testcase { 'reveal identities', 'view.php?id=' . $assign->get_course_module()->id, get_string('revealidentities', 'assign'), - $assign->get_course_module()->id, - $this->editingteachers[0]->id + $assign->get_course_module()->id ); $this->assertEventLegacyLogData($expected, $event); $sink->close(); @@ -1233,8 +1230,7 @@ class mod_assign_locallib_testcase extends mod_assign_base_testcase { 'view.php?id=' . $assign->get_course_module()->id, get_string('reverttodraftforstudent', 'assign', array('id' => $this->students[0]->id, 'fullname' => fullname($this->students[0]))), - $assign->get_course_module()->id, - $this->editingteachers[0]->id + $assign->get_course_module()->id ); $this->assertEventLegacyLogData($expected, $event); $sink->close(); @@ -1268,8 +1264,7 @@ class mod_assign_locallib_testcase extends mod_assign_base_testcase { 'view.php?id=' . $assign->get_course_module()->id, get_string('setmarkerallocationforlog', 'assign', array('id' => $this->students[0]->id, 'fullname' => fullname($this->students[0]), 'marker' => fullname($this->teachers[0]))), - $assign->get_course_module()->id, - $this->editingteachers[0]->id + $assign->get_course_module()->id ); $this->assertEventLegacyLogData($expected, $event); $sink->close(); @@ -1303,8 +1298,7 @@ class mod_assign_locallib_testcase extends mod_assign_base_testcase { 'view.php?id=' . $assign->get_course_module()->id, get_string('setmarkingworkflowstateforlog', 'assign', array('id' => $this->students[0]->id, 'fullname' => fullname($this->students[0]), 'state' => ASSIGN_MARKING_WORKFLOW_STATE_INREVIEW)), - $assign->get_course_module()->id, - $this->editingteachers[0]->id + $assign->get_course_module()->id ); $this->assertEventLegacyLogData($expected, $event); $sink->close(); @@ -1340,8 +1334,7 @@ class mod_assign_locallib_testcase extends mod_assign_base_testcase { 'submissioncopied', 'view.php?id=' . $assign->get_course_module()->id, $assign->testable_format_submission_for_log($submission2), - $assign->get_course_module()->id, - $this->students[0]->id + $assign->get_course_module()->id ); $this->assertEventLegacyLogData($expected, $event); $sink->close(); @@ -1370,8 +1363,7 @@ class mod_assign_locallib_testcase extends mod_assign_base_testcase { 'view.php?id=' . $assign->get_course_module()->id, get_string('unlocksubmissionforstudent', 'assign', array('id' => $this->students[0]->id, 'fullname' => fullname($this->students[0]))), - $assign->get_course_module()->id, - $this->editingteachers[0]->id + $assign->get_course_module()->id ); $this->assertEventLegacyLogData($expected, $event); $sink->close(); @@ -1405,8 +1397,7 @@ class mod_assign_locallib_testcase extends mod_assign_base_testcase { 'grade submission', 'view.php?id=' . $assign->get_course_module()->id, $assign->format_grade_for_log($grade), - $assign->get_course_module()->id, - $this->editingteachers[0]->id + $assign->get_course_module()->id ); $this->assertEventLegacyLogData($expected, $event); $sink->close(); @@ -1435,8 +1426,7 @@ class mod_assign_locallib_testcase extends mod_assign_base_testcase { 'grade submission', 'view.php?id=' . $assign->get_course_module()->id, $assign->format_grade_for_log($grade), - $assign->get_course_module()->id, - $this->editingteachers[0]->id + $assign->get_course_module()->id ); $this->assertEventLegacyLogData($expected, $event); $sink->close();