function UnicodeTest::providerTestConvertToUtf8

Same name and namespace in other branches
  1. 9 core/tests/Drupal/Tests/Component/Utility/UnicodeTest.php \Drupal\Tests\Component\Utility\UnicodeTest::providerTestConvertToUtf8()
  2. 10 core/tests/Drupal/Tests/Component/Utility/UnicodeTest.php \Drupal\Tests\Component\Utility\UnicodeTest::providerTestConvertToUtf8()
  3. 11.x 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 506

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',
            '€',
        ],
    ];
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.