You are here

public function MailTest::testFormatDisplayName in Drupal 8

Same name and namespace in other branches
  1. 9 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 23

Class

MailTest
Test mail helpers implemented in Mail component.

Namespace

Drupal\Tests\Component\Utility

Code

public function testFormatDisplayName($string, $safe_display_name) {
  $this
    ->assertEquals($safe_display_name, Mail::formatDisplayName($string));
}