MDL-62140 core_privacy: Improve unit test
authorAndrew Nicols <andrew@nicols.co.uk>
Tue, 24 Apr 2018 02:18:31 +0000 (10:18 +0800)
committerAndrew Nicols <andrew@nicols.co.uk>
Tue, 24 Apr 2018 02:18:31 +0000 (10:18 +0800)
privacy/tests/contextlist_test.php

index 5f4d2ef..7859651 100644 (file)
@@ -79,6 +79,7 @@ class contextlist_test extends advanced_testcase {
      */
     public function test_add_user_context() {
         $user = $this->getDataGenerator()->create_user();
+        $this->getDataGenerator()->create_user();
 
         $cl = new contextlist();
         $cl->add_user_context($user->id);
@@ -96,6 +97,7 @@ class contextlist_test extends advanced_testcase {
     public function test_add_user_contexts() {
         $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]);