Merge branch 'MDL-62140_master' of git://github.com/markn86/moodle
authorAndrew Nicols <andrew@nicols.co.uk>
Tue, 24 Apr 2018 03:16:07 +0000 (11:16 +0800)
committerAndrew Nicols <andrew@nicols.co.uk>
Tue, 24 Apr 2018 03:16:07 +0000 (11:16 +0800)
privacy/tests/contextlist_test.php

index 7859651..736e523 100644 (file)
@@ -37,13 +37,6 @@ use \core_privacy\local\request\contextlist;
  */
 class contextlist_test extends advanced_testcase {
 
-    /**
-     * Runs before each test is performed.
-     */
-    public function setUp() {
-        $this->resetAfterTest();
-    }
-
     /**
      * Ensure that valid SQL results in the relevant contexts being added.
      */
@@ -78,6 +71,8 @@ class contextlist_test extends advanced_testcase {
      * Ensure that a valid user context id is added.
      */
     public function test_add_user_context() {
+        $this->resetAfterTest();
+
         $user = $this->getDataGenerator()->create_user();
         $this->getDataGenerator()->create_user();
 
@@ -95,6 +90,8 @@ class contextlist_test extends advanced_testcase {
      * Ensure that valid user contexts are added.
      */
     public function test_add_user_contexts() {
+        $this->resetAfterTest();
+
         $user1 = $this->getDataGenerator()->create_user();
         $user2 = $this->getDataGenerator()->create_user();
         $this->getDataGenerator()->create_user();