You are here

public function TransliterationTest::testTransform in Migrate Plus 8.4

Same name and namespace in other branches
  1. 8.5 tests/src/Unit/process/TransliterationTest.php \Drupal\Tests\migrate_plus\Unit\process\TransliterationTest::testTransform()

Tests transliteration transformation of non-alphanumeric characters.

File

tests/src/Unit/process/TransliterationTest.php, line 42

Class

TransliterationTest
Tests the transliteration process plugin.

Namespace

Drupal\Tests\migrate_plus\Unit\process

Code

public function testTransform() {
  $actual = '9000004351_53494854_Spøgelsesjægerneáéö';
  $expected_result = '9000004351_53494854_Spogelsesjaegerneaeo';
  $plugin = new Transliteration([], 'transliteration', [], $this->transliteration);
  $value = $plugin
    ->transform($actual, $this->migrateExecutable, $this->row, 'destinationproperty');
  $this
    ->assertEquals($expected_result, $value);
}