diff --git a/core/tests/Drupal/Tests/Component/Transliteration/PhpTransliterationTest.php b/core/tests/Drupal/Tests/Component/Transliteration/PhpTransliterationTest.php index 8bf5748..965ede5 100644 --- a/core/tests/Drupal/Tests/Component/Transliteration/PhpTransliterationTest.php +++ b/core/tests/Drupal/Tests/Component/Transliteration/PhpTransliterationTest.php @@ -8,6 +8,7 @@ namespace Drupal\Tests\Transliteration; use Drupal\Component\Transliteration\PHPTransliteration; +use Drupal\Component\Utility\Random; use Drupal\Tests\UnitTestCase; /** @@ -51,7 +52,7 @@ public function testPHPTransliteration($langcode, $original, $expected) { */ public static function providerTestPHPTransliteration() { - $random = self::randomName(10); + $random = Random::String(10); // Make some strings with two, three, and four-byte characters for testing. // Note that the 3-byte character is overridden by the 'kg' language. $two_byte = 'Ä Ö Ü Å Ø äöüåøhello'; @@ -98,6 +99,8 @@ public static function providerTestPHPTransliteration() { // Test strings in some other languages. // Turkish, provided by drupal.org user Kartagis. array('tr', 'Abayı serdiler bize. Söyleyeceğim yüzlerine. Sanırım hepimiz aynı şeyi düşünüyoruz.', 'Abayi serdiler bize. Soyleyecegim yuzlerine. Sanirim hepimiz ayni seyi dusunuyoruz.'), + // Illegal/unknown unicode. + array('en', chr(0xF8) . chr(0x80) . chr(0x80) . chr(0x80) . chr(0x80), '?'), ); }