You are here

function SmtpUnitTest::testSetup in SMTP Authentication Support 7

Same name and namespace in other branches
  1. 7.2 tests/smtp.unit.test \SmtpUnitTest::testSetup()

Confirm that SMTP has taken over the 'mail_system' variable.

File

tests/smtp.unit.test, line 51
Some tests for the SMTP module.

Class

SmtpUnitTest
@file Some tests for the SMTP module.

Code

function testSetup() {
  $enabled = variable_get('mail_system', array());
  $should_be = array(
    'default-system' => 'SmtpMailSystem',
  );
  $this
    ->assertEqual($enabled, $should_be, 'SMTP is controlling mail delivery.');
  $delivery = variable_get('smtp_on', TRUE);
  $this
    ->assertEqual($delivery, TRUE, 'SMTP is enabled.');
  $delivery = variable_get('smtp_deliver', FALSE);
  $this
    ->assertEqual($delivery, FALSE, 'Email delivery is disabled.');
  $logging = variable_get('maillog_log', TRUE);
  $this
    ->assertEqual($logging, TRUE, 'Email delivery is being logged.');
}