use Drupal\Component\Transliteration\PhpTransliteration;
use Drupal\Component\Utility\Random;
-use Drupal\Tests\UnitTestCase;
use org\bovigo\vfs\vfsStream;
+use PHPUnit\Framework\TestCase;
/**
* Tests Transliteration component functionality.
*
* @coversDefaultClass \Drupal\Component\Transliteration\PhpTransliteration
*/
-class PhpTransliterationTest extends UnitTestCase {
+class PhpTransliterationTest extends TestCase {
/**
* Tests the PhpTransliteration::removeDiacritics() function.
// 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';
- // This is a Cyrrillic character that looks something like a u. See
+ // This is a Cyrillic character that looks something like a "u". See
// http://www.unicode.org/charts/PDF/U0400.pdf
$three_byte = html_entity_decode('ц', ENT_NOQUOTES, 'UTF-8');
// This is a Canadian Aboriginal character like a triangle. See
]);
$transliteration = new PhpTransliteration(vfsStream::url('transliteration/dir'));
$transliterated = $transliteration->transliterate(chr(0xC2) . chr(0x82), '../index');
- $this->assertSame($transliterated, 'safe');
+ $this->assertSame('safe', $transliterated);
}
}