diff --git a/lib/tests/message_test.php b/lib/tests/message_test.php index fd3023aa33b..105f37c8037 100644 --- a/lib/tests/message_test.php +++ b/lib/tests/message_test.php @@ -174,7 +174,7 @@ class core_message_testcase extends advanced_testcase { $this->assertSame(get_string('unreadnewmessage', 'message', fullname($user1)), $email->subject); $this->assertNotEmpty($email->header); $this->assertNotEmpty($email->body); - $this->assertRegExp('/test message body.*test/s', $email->body); + $this->assertRegExp('/test.*message body.*test/s', $email->body); $sink->clear(); // Test that event fired includes the courseid. @@ -214,7 +214,7 @@ class core_message_testcase extends advanced_testcase { $this->assertSame(get_string('unreadnewmessage', 'message', fullname($user1)), $email->subject); $this->assertNotEmpty($email->header); $this->assertNotEmpty($email->body); - $this->assertNotRegExp('/test message body test/', $email->body); + $this->assertNotRegExp('/test.*message body test/', $email->body); // Test that event fired includes the courseid. $eventsink = $this->redirectEvents(); diff --git a/lib/tests/messagelib_test.php b/lib/tests/messagelib_test.php index bb425470a8e..4fa621888e8 100644 --- a/lib/tests/messagelib_test.php +++ b/lib/tests/messagelib_test.php @@ -808,7 +808,7 @@ class core_messagelib_testcase extends advanced_testcase { // so verify the expected beginning and ends. $this->assertNotEmpty($email->header); $this->assertNotEmpty($email->body); - $this->assertRegExp('/test message body.*test/s', $email->body); + $this->assertRegExp('/test.*message body.*test/s', $email->body); $sink->clear(); // Now, send the message again, and verify that the event fired includes the courseid and conversationid.