diff --git a/core/modules/contact/lib/Drupal/contact/Tests/ContactPersonalTest.php b/core/modules/contact/lib/Drupal/contact/Tests/ContactPersonalTest.php index 1cf21cb..c7056a7 100644 --- a/core/modules/contact/lib/Drupal/contact/Tests/ContactPersonalTest.php +++ b/core/modules/contact/lib/Drupal/contact/Tests/ContactPersonalTest.php @@ -73,6 +73,7 @@ function testSendPersonalContactMessage() { $this->assertEqual(1, count($mails)); $mail = $mails[0]; $this->assertEqual($mail['to'], $this->contact_user->getEmail()); + $this->assertEqual($mail['from'], \Drupal::config('system.site')->get('mail')); $this->assertEqual($mail['reply-to'], $this->web_user->getEmail()); $this->assertEqual($mail['key'], 'user_mail'); $variables = array( diff --git a/core/modules/system/lib/Drupal/system/Tests/Mail/MailTest.php b/core/modules/system/lib/Drupal/system/Tests/Mail/MailTest.php index 770f0ed..c0879aa 100644 --- a/core/modules/system/lib/Drupal/system/Tests/Mail/MailTest.php +++ b/core/modules/system/lib/Drupal/system/Tests/Mail/MailTest.php @@ -85,17 +85,17 @@ public function testFromAndReplyToHeader() { // Reset the class variable holding a copy of the last sent message. self::$sent_message = NULL; - // Send an e-mail with a sender address specified. - $from_email = 'someone_else@example.com'; - drupal_mail('simpletest', 'from_test', 'from_test@example.com', $language, array(), $from_email); - // Test that the from e-mail is just the e-mail and not the site name and + // Send an e-mail with a reply-to address specified. + $reply_email = 'someone_else@example.com'; + drupal_mail('simpletest', 'from_test', 'from_test@example.com', $language, array(), $reply_email); + // Test that the reply-to e-mail is just the e-mail and not the site name and // default sender e-mail. - $this->assertEqual($from_email, self::$sent_message['headers']['Reply-to']); + $this->assertEqual($reply_email, self::$sent_message['headers']['Reply-to']); self::$sent_message = NULL; // Send an e-mail and check that the From-header contains the site name. drupal_mail('simpletest', 'from_test', 'from_test@example.com', $language); - $this->assertEqual('simpletest@example.com', self::$sent_message['headers']['From']); + $this->assertEqual('Drupal ', self::$sent_message['headers']['From']); } /**