function MailTest::testFormatDisplayName
Same name in other branches
- 8.9.x core/tests/Drupal/Tests/Component/Utility/MailTest.php \Drupal\Tests\Component\Utility\MailTest::testFormatDisplayName()
Tests RFC-2822 'display-name' formatter.
@dataProvider providerTestDisplayName @covers ::formatDisplayName
File
-
core/
tests/ Drupal/ Tests/ Component/ Utility/ MailTest.php, line 26
Class
- MailTest
- Test mail helpers implemented in Mail component.
Namespace
Drupal\Tests\Component\UtilityCode
public function testFormatDisplayName($string, $safe_display_name) {
$this->expectDeprecation('\\Drupal\\Component\\Utility\\Unicode::mimeHeaderEncode() is deprecated in drupal:9.2.0 and is removed from drupal:10.0.0. Use \\Symfony\\Component\\Mime\\Header\\UnstructuredHeader instead. See https://www.drupal.org/node/3207439');
$this->assertEquals($safe_display_name, Mail::formatDisplayName($string));
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.