MDL-65458 message_email: fix failing unit test
authorMark Nelson <markn@moodle.com>
Fri, 3 May 2019 02:00:54 +0000 (10:00 +0800)
committerMark Nelson <markn@moodle.com>
Fri, 3 May 2019 02:01:11 +0000 (10:01 +0800)
message/output/email/tests/send_email_task_test.php

index e292f76..ac6c8bc 100644 (file)
@@ -129,7 +129,7 @@ class core_message_send_email_task_testcase extends advanced_testcase {
         $this->assertContains('Group 1', $emailbody);
         $this->assertContains('Group 2', $emailbody);
         // 5 unread messages per conversation, this will be listed twice.
         $this->assertContains('Group 1', $emailbody);
         $this->assertContains('Group 2', $emailbody);
         // 5 unread messages per conversation, this will be listed twice.
-        $this->assertRegExp("/<span\b[^>]*>5<\/span> Unread message\w+/", $emailbody);
+        $this->assertRegExp("/<span\b[^>]*>5<\/span> <span\b[^>]*>Unread message\w+/", $emailbody);
 
         // Confirm table was emptied after task was run.
         $this->assertEquals(0, $DB->count_records('message_email_messages'));
 
         // Confirm table was emptied after task was run.
         $this->assertEquals(0, $DB->count_records('message_email_messages'));