summaryrefslogtreecommitdiffstats
path: root/core/tests/Drupal/Tests/Core/Routing/RedirectDestinationTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'core/tests/Drupal/Tests/Core/Routing/RedirectDestinationTest.php')
-rw-r--r--core/tests/Drupal/Tests/Core/Routing/RedirectDestinationTest.php12
1 files changed, 12 insertions, 0 deletions
diff --git a/core/tests/Drupal/Tests/Core/Routing/RedirectDestinationTest.php b/core/tests/Drupal/Tests/Core/Routing/RedirectDestinationTest.php
index 3f38859..e305bd1 100644
--- a/core/tests/Drupal/Tests/Core/Routing/RedirectDestinationTest.php
+++ b/core/tests/Drupal/Tests/Core/Routing/RedirectDestinationTest.php
@@ -64,6 +64,13 @@ class RedirectDestinationTest extends UnitTestCase {
}
/**
+ * Tests destination passed via $_GET.
+ *
+ * @param \Symfony\Component\HttpFoundation\Request $request
+ * The request to test.
+ * @param string $expected_destination
+ * The expected destination.
+ *
* @dataProvider providerGet
*
* @covers ::get
@@ -108,6 +115,11 @@ class RedirectDestinationTest extends UnitTestCase {
$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;
}