function UnicodeTest::providerTestTruncateBytes
Same name in other branches
- 8.9.x core/tests/Drupal/Tests/Component/Utility/UnicodeTest.php \Drupal\Tests\Component\Utility\UnicodeTest::providerTestTruncateBytes()
- 10 core/tests/Drupal/Tests/Component/Utility/UnicodeTest.php \Drupal\Tests\Component\Utility\UnicodeTest::providerTestTruncateBytes()
- 11.x core/tests/Drupal/Tests/Component/Utility/UnicodeTest.php \Drupal\Tests\Component\Utility\UnicodeTest::providerTestTruncateBytes()
Provides data for self::testTruncateBytes().
Return value
array An array of arrays, each containing the parameters to self::testTruncateBytes().
File
-
core/
tests/ Drupal/ Tests/ Component/ Utility/ UnicodeTest.php, line 300
Class
- UnicodeTest
- Test unicode handling features implemented in Unicode component.
Namespace
Drupal\Tests\Component\UtilityCode
public function providerTestTruncateBytes() {
return [
// String shorter than max length.
[
'Short string',
42,
'Short string',
],
// Simple string longer than max length.
[
'Longer string than previous.',
10,
'Longer str',
],
// Unicode.
[
'以呂波耳・ほへとち。リヌルヲ。',
10,
'以呂波',
],
];
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.