You are here

public function PathSetTranslatedTest::testTransform in Drupal 8

Same name and namespace in other branches
  1. 9 core/modules/path/tests/src/Unit/migrate/process/PathSetTranslatedTest.php \Drupal\Tests\path\Unit\migrate\process\PathSetTranslatedTest::testTransform()

Tests the transform method.

@covers ::transform

@dataProvider transformDataProvider

Parameters

string $path: The path to test.

mixed $node_translation: The translated node value to test.

string $expected_result: The expected result.

File

core/modules/path/tests/src/Unit/migrate/process/PathSetTranslatedTest.php, line 30

Class

PathSetTranslatedTest
Tests the path_set_translated process plugin.

Namespace

Drupal\Tests\path\Unit\migrate\process

Code

public function testTransform($path, $node_translation, $expected_result) {
  $plugin = new PathSetTranslated([], 'path_set_translated', []);
  $this
    ->assertSame($expected_result, $plugin
    ->transform([
    $path,
    $node_translation,
  ], $this->migrateExecutable, $this->row, 'destination_property'));
}