function RouteTest::providerTestRouteWithParamQuery
Same name in other branches
- 9 core/modules/migrate/tests/src/Kernel/process/RouteTest.php \Drupal\Tests\migrate\Kernel\process\RouteTest::providerTestRouteWithParamQuery()
- 8.9.x core/modules/migrate/tests/src/Kernel/process/RouteTest.php \Drupal\Tests\migrate\Kernel\process\RouteTest::providerTestRouteWithParamQuery()
- 10 core/modules/migrate/tests/src/Kernel/process/RouteTest.php \Drupal\Tests\migrate\Kernel\process\RouteTest::providerTestRouteWithParamQuery()
Data provider for testRouteWithParamQuery().
Return value
array An array of arrays, where the first element is the input to the Route process plugin, and the second is the expected results.
File
-
core/
modules/ migrate/ tests/ src/ Kernel/ process/ RouteTest.php, line 219
Class
- RouteTest
- Tests the route process plugin.
Namespace
Drupal\Tests\migrate\Kernel\processCode
public static function providerTestRouteWithParamQuery() {
$values = [];
$expected = [];
// Valid link path with query options and parameters.
$values[0] = [
'user/1/edit',
[
'attributes' => [
'title' => 'Edit admin',
],
'query' => [
'destination' => '/admin/people',
],
],
];
$expected[0] = [
'route_name' => 'entity.user.edit_form',
'route_parameters' => [
'user' => '1',
],
'options' => [
'attributes' => [
'title' => 'Edit admin',
],
'query' => [
'destination' => '/admin/people',
],
],
'url' => NULL,
];
return [
// Test with valid link path with parameters and options.
[
$values[0],
$expected[0],
],
];
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.