public function PhpTransliterationTest::testRemoveDiacritics in Zircon Profile 8
Same name and namespace in other branches
- 8.0 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 34 - Contains \Drupal\Tests\Component\Transliteration\PhpTransliterationTest.
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);
}