Upgraded drupal core with security updates
[yaffs-website] / web / core / tests / Drupal / KernelTests / Core / Path / UrlAlterTest.php
1 <?php
2
3 namespace Drupal\KernelTests\Core\Path;
4
5 use Drupal\Core\Url;
6 use Drupal\KernelTests\KernelTestBase;
7
8 /**
9  * Tests the capability to alter URLs.
10  *
11  * @group Path
12  *
13  * @see \Drupal\Core\Routing\UrlGenerator::processPath
14  */
15 class UrlAlterTest extends KernelTestBase {
16
17   /**
18    * {@inheritdoc}
19    */
20   public static $modules = ['path', 'url_alter_test', 'user'];
21
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());
26   }
27
28 }