public function UnicodeTest::providerTestTruncateBytes in Zircon Profile 8
Same name and namespace in other branches
- 8.0 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 451 - Contains \Drupal\Tests\Component\Utility\UnicodeTest.
Class
- UnicodeTest
- Test unicode handling features implemented in Unicode component.
Namespace
Drupal\Tests\Component\UtilityCode
public function providerTestTruncateBytes() {
return array(
// String shorter than max length.
array(
'Short string',
42,
'Short string',
),
// Simple string longer than max length.
array(
'Longer string than previous.',
10,
'Longer str',
),
// Unicode.
array(
'以呂波耳・ほへとち。リヌルヲ。',
10,
'以呂波',
),
);
}