function TransportTest::testMissingFactory

@covers ::createTransport

File

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

Class

TransportTest
Tests the transport factory service.

Namespace

Drupal\Tests\mailer\Kernel

Code

public function testMissingFactory() : void {
    $this->setUpMailerDsnConfigOverride('drupal.no-transport', 'default');
    $this->expectExceptionMessage('The "drupal.no-transport" scheme is not supported');
    $this->container
        ->get(TransportInterface::class);
}

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