function LinkUriTest::doTransform
Same name in other branches
- 9 core/modules/menu_link_content/tests/src/Kernel/Plugin/migrate/process/LinkUriTest.php \Drupal\Tests\menu_link_content\Kernel\Plugin\migrate\process\LinkUriTest::doTransform()
- 10 core/modules/menu_link_content/tests/src/Kernel/Plugin/migrate/process/LinkUriTest.php \Drupal\Tests\menu_link_content\Kernel\Plugin\migrate\process\LinkUriTest::doTransform()
- 11.x core/modules/menu_link_content/tests/src/Kernel/Plugin/migrate/process/LinkUriTest.php \Drupal\Tests\menu_link_content\Kernel\Plugin\migrate\process\LinkUriTest::doTransform()
Transforms a link path into an 'internal:' or 'entity:' URI.
Parameters
string $value: The value to pass to LinkUri::transform().
array $configuration: The plugin configuration.
Return value
string The transformed link.
3 calls to LinkUriTest::doTransform()
- LinkUriTest::testDisablingRouteValidation in core/
modules/ menu_link_content/ tests/ src/ Kernel/ Plugin/ migrate/ process/ LinkUriTest.php - Tests disabling route validation in LinkUri::transform().
- LinkUriTest::testNotRouted in core/
modules/ menu_link_content/ tests/ src/ Kernel/ Plugin/ migrate/ process/ LinkUriTest.php - Tests that Non routed URLs throws an exception.
- LinkUriTest::testRouted in core/
modules/ menu_link_content/ tests/ src/ Kernel/ Plugin/ migrate/ process/ LinkUriTest.php - Tests LinkUri::transform().
File
-
core/
modules/ menu_link_content/ tests/ src/ Kernel/ Plugin/ migrate/ process/ LinkUriTest.php, line 195
Class
Namespace
Drupal\Tests\menu_link_content\Kernel\Plugin\migrate\processCode
public function doTransform($value, $configuration = []) {
$entityTypeManager = $this->container
->get('entity_type.manager');
$routeBuilder = $this->container
->get('router.builder');
$row = new Row();
$executable = $this->prophesize(MigrateExecutableInterface::class)
->reveal();
$plugin = new LinkUri($configuration, 'link_uri', [], $entityTypeManager, $routeBuilder);
$actual = $plugin->transform($value, $executable, $row, 'destination_property');
return $actual;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.