function MailDsnSettingsUpdateTest::testSystemPostUpdateMailerDsnSettings

Same name in other branches
  1. 11.x core/modules/system/tests/src/Functional/Update/MailDsnSettingsUpdateTest.php \Drupal\Tests\system\Functional\Update\MailDsnSettingsUpdateTest::testSystemPostUpdateMailerDsnSettings()

Tests system_post_update_mailer_dsn_settings().

File

core/modules/system/tests/src/Functional/Update/MailDsnSettingsUpdateTest.php, line 30

Class

MailDsnSettingsUpdateTest
Tests creation of default mail transport dsn settings.

Namespace

Drupal\Tests\system\Functional\Update

Code

public function testSystemPostUpdateMailerDsnSettings() : void {
    $this->runUpdates();
    // Confirm that config was created.
    $config = $this->config('system.mail');
    $expected = [
        'scheme' => 'sendmail',
        'host' => 'default',
        'user' => NULL,
        'password' => NULL,
        'port' => NULL,
        'options' => [],
    ];
    $this->assertEquals($expected, $config->get('mailer_dsn'));
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.