MDL-57630 messaging: Pass unit test with third-party plugins
authorMichael Aherne <michael.aherne@strath.ac.uk>
Wed, 11 Jan 2017 16:37:46 +0000 (16:37 +0000)
committerMichael Aherne <michael.aherne@strath.ac.uk>
Wed, 11 Jan 2017 16:37:46 +0000 (16:37 +0000)
message/tests/externallib_test.php

index 9b8eab2..6a53627 100644 (file)
@@ -931,11 +931,11 @@ class core_message_externallib_testcase extends externallib_advanced_testcase {
         $prefs = core_message_external::get_user_notification_preferences();
         $prefs = external_api::clean_returnvalue(core_message_external::get_user_notification_preferences_returns(), $prefs);
         // Check processors.
-        $this->assertCount(2, $prefs['preferences']['processors']);
+        $this->assertGreaterThanOrEqual(2, count($prefs['preferences']['processors']));
         $this->assertEquals($user->id, $prefs['preferences']['userid']);
 
         // Check components.
-        $this->assertCount(8, $prefs['preferences']['components']);
+        $this->assertGreaterThanOrEqual(8, count($prefs['preferences']['components']));
 
         // Check some preferences that we previously set.
         $found = 0;