MDL-64993 core_message: fix behat test failing with Oracle
authorSara Arjona <sara@moodle.com>
Mon, 6 May 2019 19:55:20 +0000 (21:55 +0200)
committerAdrian Greeve <abgreeve@gmail.com>
Tue, 7 May 2019 08:26:47 +0000 (16:26 +0800)
message/tests/privacy_provider_test.php

index d43050b..24db3c0 100644 (file)
@@ -1467,8 +1467,10 @@ class core_message_privacy_provider_testcase extends \core_privacy\tests\provide
         $this->assertCount(0, $muas);
 
         $this->assertCount(6, $mcms);
-        $mcm = reset($mcms);
-        $this->assertEquals($user2->id, $mcm->userid);
+        $memberids = array_map(function($convmember) {
+                return $convmember->userid;
+        }, $mcms);
+        $this->assertContains($user2->id, $memberids);
 
         $this->assertCount(2, $notifications);
         ksort($notifications);