function PhpTransliterationTest::testRemoveDiacritics
Same name in other branches
- 9 core/tests/Drupal/Tests/Component/Transliteration/PhpTransliterationTest.php \Drupal\Tests\Component\Transliteration\PhpTransliterationTest::testRemoveDiacritics()
- 10 core/tests/Drupal/Tests/Component/Transliteration/PhpTransliterationTest.php \Drupal\Tests\Component\Transliteration\PhpTransliterationTest::testRemoveDiacritics()
- 11.x 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);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.