function PathSetTranslatedTest::testTransform
Same name in other branches
- 9 core/modules/path/tests/src/Unit/migrate/process/PathSetTranslatedTest.php \Drupal\Tests\path\Unit\migrate\process\PathSetTranslatedTest::testTransform()
- 8.9.x core/modules/path/tests/src/Unit/migrate/process/PathSetTranslatedTest.php \Drupal\Tests\path\Unit\migrate\process\PathSetTranslatedTest::testTransform()
- 10 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 32
Class
- PathSetTranslatedTest
- Tests the path_set_translated process plugin.
Namespace
Drupal\Tests\path\Unit\migrate\processCode
public function testTransform($path, $node_translation, $expected_result) : void {
$plugin = new PathSetTranslated([], 'path_set_translated', []);
$this->assertSame($expected_result, $plugin->transform([
$path,
$node_translation,
], $this->migrateExecutable, $this->row, 'destination_property'));
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.