function UrlBubbleableMetadataBubblingTest::testUrlBubbleableMetadataBubbling
Same name in other branches
- 9 core/modules/system/tests/src/Functional/Render/UrlBubbleableMetadataBubblingTest.php \Drupal\Tests\system\Functional\Render\UrlBubbleableMetadataBubblingTest::testUrlBubbleableMetadataBubbling()
- 10 core/modules/system/tests/src/Functional/Render/UrlBubbleableMetadataBubblingTest.php \Drupal\Tests\system\Functional\Render\UrlBubbleableMetadataBubblingTest::testUrlBubbleableMetadataBubbling()
- 11.x core/modules/system/tests/src/Functional/Render/UrlBubbleableMetadataBubblingTest.php \Drupal\Tests\system\Functional\Render\UrlBubbleableMetadataBubblingTest::testUrlBubbleableMetadataBubbling()
Tests that URL bubbleable metadata is correctly bubbled.
File
-
core/
modules/ system/ tests/ src/ Functional/ Render/ UrlBubbleableMetadataBubblingTest.php, line 40
Class
- UrlBubbleableMetadataBubblingTest
- Tests that URL bubbleable metadata is correctly bubbled.
Namespace
Drupal\Tests\system\Functional\RenderCode
public function testUrlBubbleableMetadataBubbling() {
// Test that regular URLs bubble up bubbleable metadata when converted to
// string.
$url = Url::fromRoute('cache_test.url_bubbling');
$this->drupalGet($url);
$this->assertCacheContext('url.site');
$this->assertRaw($url->setAbsolute()
->toString());
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.