function RedirectDestinationTest::providerGet
Same name in other branches
- 9 core/tests/Drupal/Tests/Core/Routing/RedirectDestinationTest.php \Drupal\Tests\Core\Routing\RedirectDestinationTest::providerGet()
- 8.9.x core/tests/Drupal/Tests/Core/Routing/RedirectDestinationTest.php \Drupal\Tests\Core\Routing\RedirectDestinationTest::providerGet()
- 10 core/tests/Drupal/Tests/Core/Routing/RedirectDestinationTest.php \Drupal\Tests\Core\Routing\RedirectDestinationTest::providerGet()
File
-
core/
tests/ Drupal/ Tests/ Core/ Routing/ RedirectDestinationTest.php, line 99
Class
- RedirectDestinationTest
- @coversDefaultClass \Drupal\Core\Routing\RedirectDestination @group Routing
Namespace
Drupal\Tests\Core\RoutingCode
public static function providerGet() {
$data = [];
$request = Request::create('/');
$request->query
->set('destination', '/example');
// A request with a destination query.
$data[] = [
$request,
'/example',
];
// A request without a destination query,
$request = Request::create('/');
$data[] = [
$request,
'/current-path',
];
// A request without destination query, but other query attributes.
$request = Request::create('/');
$request->query
->set('other', 'value');
$data[] = [
$request,
'/current-path?other=value',
];
// A request with a dedicated specified external destination.
$request = Request::create('/');
$request->query
->set('destination', 'https://www.drupal.org');
$data[] = [
$request,
'/',
];
return $data;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.