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

@@@ -37,13 -37,6 +37,6 @@@ use \core_privacy\local\request\context
   */
  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.
       */
       * 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]);