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)
1  2 
privacy/tests/contextlist_test.php

@@@ -78,8 -71,9 +71,10 @@@ class contextlist_test extends advanced
       * 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();
  
          $cl = new contextlist();
          $cl->add_user_context($user->id);
       * 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();
  
          $cl = new contextlist();
          $cl->add_user_contexts([$user1->id, $user2->id]);