function TransportTest::setUpMailerDsnConfigOverride

Sets up a mailer DSN config override.

Parameters

string $scheme: The mailer DSN scheme.

string $host: The mailer DSN host.

string|null $user: The mailer DSN username.

string|null $password: The mailer DSN password.

int|null $port: The mailer DSN port.

array<string, mixed> $options: Options for the mailer transport.

File

core/modules/mailer/tests/src/Kernel/TransportTest.php, line 45

Class

TransportTest
Tests the transport factory service.

Namespace

Drupal\Tests\mailer\Kernel

Code

protected function setUpMailerDsnConfigOverride(string $scheme, string $host, ?string $user = NULL, ?string $password = NULL, ?int $port = NULL, array $options = []) : void {
    $GLOBALS['config']['system.mail']['mailer_dsn'] = [
        'scheme' => $scheme,
        'host' => $host,
        'user' => $user,
        'password' => $password,
        'port' => $port,
        'options' => $options,
    ];
}

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