function UrlAlterTest::testUrlWithQueryString
Same name in other branches
- 9 core/tests/Drupal/KernelTests/Core/Path/UrlAlterTest.php \Drupal\KernelTests\Core\Path\UrlAlterTest::testUrlWithQueryString()
- 8.9.x core/tests/Drupal/KernelTests/Core/Path/UrlAlterTest.php \Drupal\KernelTests\Core\Path\UrlAlterTest::testUrlWithQueryString()
- 11.x core/tests/Drupal/KernelTests/Core/Path/UrlAlterTest.php \Drupal\KernelTests\Core\Path\UrlAlterTest::testUrlWithQueryString()
File
-
core/
tests/ Drupal/ KernelTests/ Core/ Path/ UrlAlterTest.php, line 24
Class
- UrlAlterTest
- Tests the capability to alter URLs.
Namespace
Drupal\KernelTests\Core\PathCode
public function testUrlWithQueryString() : void {
// Test outbound query string altering.
$url = Url::fromRoute('user.login');
$this->assertEquals(\Drupal::request()->getBaseUrl() . '/user/login?foo=bar', $url->toString());
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.