You are here

public function UnicodeTest::testMimeHeader in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/tests/Drupal/Tests/Component/Utility/UnicodeTest.php \Drupal\Tests\Component\Utility\UnicodeTest::testMimeHeader()

Tests multibyte encoding and decoding.

@dataProvider providerTestMimeHeader @covers ::mimeHeaderEncode @covers ::mimeHeaderDecode

File

core/tests/Drupal/Tests/Component/Utility/UnicodeTest.php, line 77
Contains \Drupal\Tests\Component\Utility\UnicodeTest.

Class

UnicodeTest
Test unicode handling features implemented in Unicode component.

Namespace

Drupal\Tests\Component\Utility

Code

public function testMimeHeader($value, $encoded) {
  $this
    ->assertEquals($encoded, Unicode::mimeHeaderEncode($value));
  $this
    ->assertEquals($value, Unicode::mimeHeaderDecode($encoded));
}