MailTestCase::testPluggableFramework

7 mail.test MailTestCase::testPluggableFramework()
8 mail.test public MailTestCase::testPluggableFramework()

Assert that the pluggable mail system is functional.

File

modules/simpletest/tests/mail.test, line 34
Test the Drupal mailing system.

Code

function testPluggableFramework() {
  global $language;

  // Use MailTestCase for sending a message.
  $message = drupal_mail('simpletest', 'mail_test', 'testing@example.com', $language);

  // Assert whether the message was sent through the send function.
  $this->assertEqual(self::$sent_message['to'], 'testing@example.com', t('Pluggable mail system is extendable.'));
}
Login or register to post comments