You are here

protected function RouteTest::doTransform in Drupal 9

Same name and namespace in other branches
  1. 8 core/modules/migrate/tests/src/Kernel/process/RouteTest.php \Drupal\Tests\migrate\Kernel\process\RouteTest::doTransform()

Transforms link path data to a route.

Parameters

array|string $value: Source link path information.

Return value

array The route information based on the source link_path.

2 calls to RouteTest::doTransform()
RouteTest::testRoute in core/modules/migrate/tests/src/Kernel/process/RouteTest.php
Tests Route plugin based on providerTestRoute() values.
RouteTest::testRouteWithParamQuery in core/modules/migrate/tests/src/Kernel/process/RouteTest.php
Tests Route plugin based on providerTestRoute() values.

File

core/modules/migrate/tests/src/Kernel/process/RouteTest.php, line 261

Class

RouteTest
Tests the route process plugin.

Namespace

Drupal\Tests\migrate\Kernel\process

Code

protected function doTransform($value) {
  $pathValidator = $this->container
    ->get('path.validator');
  $row = new Row();
  $migration = $this
    ->prophesize(MigrationInterface::class)
    ->reveal();
  $executable = $this
    ->prophesize(MigrateExecutableInterface::class)
    ->reveal();
  $plugin = new Route([], 'route', [], $migration, $pathValidator);
  $actual = $plugin
    ->transform($value, $executable, $row, 'destination_property');
  return $actual;
}