3 namespace Drupal\KernelTests\Core\Path;
6 use Drupal\KernelTests\KernelTestBase;
9 * Tests the capability to alter URLs.
13 * @see \Drupal\Core\Routing\UrlGenerator::processPath
15 class UrlAlterTest extends KernelTestBase {
20 public static $modules = ['path', 'url_alter_test', 'user'];
22 public function testUrlWithQueryString() {
23 // Test outbound query string altering.
24 $url = Url::fromRoute('user.login');
25 $this->assertEquals(\Drupal::request()->getBaseUrl() . '/user/login?foo=bar', $url->toString());