public function TransliterationTest::testTransliterationTransform in Tamper 8
Tests transliteration transformation of non-alphanumeric characters.
File
- tests/
src/ Unit/ Plugin/ Tamper/ TransliterationTest.php, line 41
Class
- TransliterationTest
- Tests the transliteration plugin.
Namespace
Drupal\Tests\tamper\Unit\Plugin\TamperCode
public function testTransliterationTransform() {
$original = '90000012345678_Jäätelöä_Åbo_Spøgelsesjægerne_Günther_áé';
$expected = '90000012345678_Jaateloa_Abo_Spogelsesjaegerne_Gunther_ae';
$plugin = new Transliteration([], 'transliteration', [], $this
->getMockSourceDefinition(), $this->transliteration);
$this
->assertEquals($expected, $plugin
->tamper($original));
}