MDL-71919 core_message: Fix tests in message_send

This commit is contained in:
cescobedo
2021-07-08 23:32:19 +02:00
committed by Eloy Lafuente (stronk7)
parent a405f1c947
commit 386b1ad8a6
2 changed files with 3 additions and 3 deletions
+2 -2
View File
@@ -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->assertMatchesRegularExpression('/test message body.*test/s', $email->body);
$this->assertMatchesRegularExpression('/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->assertDoesNotMatchRegularExpression('/test message body test/', $email->body);
$this->assertDoesNotMatchRegularExpression('/test.*message body test/', $email->body);
// Test that event fired includes the courseid.
$eventsink = $this->redirectEvents();