function MailTest::configureDefaultMailInterface
Same name in other branches
- 9 core/modules/system/tests/src/Kernel/Mail/MailTest.php \Drupal\Tests\system\Kernel\Mail\MailTest::configureDefaultMailInterface()
- 10 core/modules/system/tests/src/Kernel/Mail/MailTest.php \Drupal\Tests\system\Kernel\Mail\MailTest::configureDefaultMailInterface()
- 11.x core/modules/system/tests/src/Kernel/Mail/MailTest.php \Drupal\Tests\system\Kernel\Mail\MailTest::configureDefaultMailInterface()
Configures the default mail interface.
KernelTestBase enforces the usage of 'test_mail_collector' plugin to collect mail. Since we need to test this functionality itself, we manually configure the default mail interface.
@todo Refactor in https://www.drupal.org/project/drupal/issues/3076715
Parameters
string $mail_interface: The mail interface to configure.
4 calls to MailTest::configureDefaultMailInterface()
- MailTest::testConvertRelativeUrlsIntoAbsolute in core/
modules/ system/ tests/ src/ Kernel/ Mail/ MailTest.php - Checks that relative paths in mails are converted into absolute URLs.
- MailTest::testErrorMessageDisplay in core/
modules/ system/ tests/ src/ Kernel/ Mail/ MailTest.php - Assert that the pluggable mail system is functional.
- MailTest::testPluggableFramework in core/
modules/ system/ tests/ src/ Kernel/ Mail/ MailTest.php - Assert that the pluggable mail system is functional.
- MailTest::testRenderedElementsUseAbsolutePaths in core/
modules/ system/ tests/ src/ Kernel/ Mail/ MailTest.php - Checks that mails built from render arrays contain absolute paths.
File
-
core/
modules/ system/ tests/ src/ Kernel/ Mail/ MailTest.php, line 377
Class
- MailTest
- Performs tests on the pluggable mailing framework.
Namespace
Drupal\Tests\system\Kernel\MailCode
protected function configureDefaultMailInterface($mail_interface) {
$GLOBALS['config']['system.mail']['interface']['default'] = $mail_interface;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.