You are here

public function UnicodeTest::providerTestConvertToUtf8 in Drupal 9

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

Provides data to self::testConvertToUtf8().

Return value

array An array of arrays, each containing the parameters to self::testConvertUtf8(). }

File

core/tests/Drupal/Tests/Component/Utility/UnicodeTest.php, line 374

Class

UnicodeTest
Test unicode handling features implemented in Unicode component.

Namespace

Drupal\Tests\Component\Utility

Code

public function providerTestConvertToUtf8() {
  return [
    [
      chr(0x97),
      'Windows-1252',
      '—',
    ],
    [
      chr(0x99),
      'Windows-1252',
      '™',
    ],
    [
      chr(0x80),
      'Windows-1252',
      '€',
    ],
  ];
}