
| Current Path : /var/www/html/stolberg/web/core/tests/Drupal/KernelTests/Core/Path/ |
Linux ift1.ift-informatik.de 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64 |
| Current File : /var/www/html/stolberg/web/core/tests/Drupal/KernelTests/Core/Path/UrlAlterTest.php |
<?php
declare(strict_types=1);
namespace Drupal\KernelTests\Core\Path;
use Drupal\Core\Url;
use Drupal\KernelTests\KernelTestBase;
/**
* Tests the capability to alter URLs.
*
* @group Path
*
* @see \Drupal\Core\Routing\UrlGenerator::processPath
*/
class UrlAlterTest extends KernelTestBase {
/**
* {@inheritdoc}
*/
protected static $modules = ['path', 'url_alter_test', 'user'];
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());
}
}