You are here

protected function MailTest::setUp in Maillog / Mail Developer 8

Overrides KernelTestBase::setUp

File

tests/src/Kernel/MailTest.php, line 30

Class

MailTest
Tests the maillog plugin.

Namespace

Drupal\Tests\maillog\Kernel

Code

protected function setUp() {
  parent::setUp();
  $this
    ->installSchema('maillog', 'maillog');
  $this
    ->installConfig([
    'system',
    'maillog',
  ]);

  // The system.site.mail setting goes into the From header of outgoing mails.
  $this
    ->config('system.site')
    ->set('mail', 'simpletest@example.com')
    ->save();

  // Use the maillog mail plugin.
  $GLOBALS['config']['system.mail']['interface']['default'] = 'maillog';

  // Disables E-Mail Sending, only tracking.
  $this
    ->config('maillog.settings')
    ->set('send', FALSE)
    ->save();
}