public function PhpTransliterationTest::testRemoveDiacritics in Drupal 10
Same name and namespace in other branches
- 8 core/tests/Drupal/Tests/Component/Transliteration/PhpTransliterationTest.php \Drupal\Tests\Component\Transliteration\PhpTransliterationTest::testRemoveDiacritics()
- 9 core/tests/Drupal/Tests/Component/Transliteration/PhpTransliterationTest.php \Drupal\Tests\Component\Transliteration\PhpTransliterationTest::testRemoveDiacritics()
Tests the PhpTransliteration::removeDiacritics() function.
@dataProvider providerTestPhpTransliterationRemoveDiacritics
Parameters
string $original: The language code to test.
string $expected: The expected return from PhpTransliteration::removeDiacritics().
File
- core/
tests/ Drupal/ Tests/ Component/ Transliteration/ PhpTransliterationTest.php, line 29
Class
- PhpTransliterationTest
- Tests Transliteration component functionality.
Namespace
Drupal\Tests\Component\TransliterationCode
public function testRemoveDiacritics($original, $expected) {
$transliterator_class = new PhpTransliteration();
$result = $transliterator_class
->removeDiacritics($original);
$this
->assertEquals($expected, $result);
}