3 namespace Drupal\system\Tests\Render;
6 use Drupal\simpletest\WebTestBase;
9 * Tests that URL bubbleable metadata is correctly bubbled.
13 class UrlBubbleableMetadataBubblingTest extends WebTestBase {
20 public static $modules = ['cache_test'];
25 protected function setUp() {
27 $this->dumpHeaders = TRUE;
31 * Tests that URL bubbleable metadata is correctly bubbled.
33 public function testUrlBubbleableMetadataBubbling() {
34 // Test that regular URLs bubble up bubbleable metadata when converted to
36 $url = Url::fromRoute('cache_test.url_bubbling');
37 $this->drupalGet($url);
38 $this->assertCacheContext('url.site');
39 $this->assertRaw($url->setAbsolute()->toString());