MDL-44606 assign: disable sesskey protection for unit test.
authorDamyon Wiese <damyon@moodle.com>
Wed, 7 May 2014 06:06:08 +0000 (14:06 +0800)
committerDamyon Wiese <damyon@moodle.com>
Wed, 7 May 2014 06:06:08 +0000 (14:06 +0800)
mod/assign/tests/events_test.php

index 4c44002..bbf9a42 100644 (file)
@@ -472,6 +472,7 @@ class assign_events_testcase extends mod_assign_base_testcase {
     }
 
     public function test_submission_graded() {
+        $this->editingteachers[0]->ignoresesskey = true;
         $this->setUser($this->editingteachers[0]);
         $assign = $this->create_instance();
 
@@ -555,6 +556,8 @@ class assign_events_testcase extends mod_assign_base_testcase {
         );
         $this->assertEventLegacyLogData($expected, $event);
         $sink->close();
+        // Revert to defaults.
+        $this->editingteachers[0]->ignoresesskey = false;
     }
 
     /**