public function RouteTest::providerTestRouteWithParamQuery in Drupal 10
Same name and namespace in other branches
- 8 core/modules/migrate/tests/src/Kernel/process/RouteTest.php \Drupal\Tests\migrate\Kernel\process\RouteTest::providerTestRouteWithParamQuery()
- 9 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 217
Class
- RouteTest
- Tests the route process plugin.
Namespace
Drupal\Tests\migrate\Kernel\processCode
public 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],
],
];
}