mirror of
https://github.com/moodle/moodle.git
synced 2025-04-22 00:42:54 +02:00
MDL-71919 core_message: Fix tests in message_send
This commit is contained in:
parent
f21ac401e2
commit
084833acbe
@ -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();
|
||||
|
@ -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->assertMatchesRegularExpression('/test message body.*test/s', $email->body);
|
||||
$this->assertMatchesRegularExpression('/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.
|
||||
|
Loading…
x
Reference in New Issue
Block a user