protected function PageCacheTagsTestBase::verifyDynamicPageCache in Drupal 9
Same name and namespace in other branches
- 8 core/modules/system/tests/src/Functional/Cache/PageCacheTagsTestBase.php \Drupal\Tests\system\Functional\Cache\PageCacheTagsTestBase::verifyDynamicPageCache()
Verify that when loading a given page, it's a page cache hit or miss.
Parameters
\Drupal\Core\Url $url: The page for this URL will be loaded.
string $hit_or_miss: 'HIT' if a page cache hit is expected, 'MISS' otherwise.
1 call to PageCacheTagsTestBase::verifyDynamicPageCache()
- ShortcutCacheTagsTest::testToolbar in core/
modules/ shortcut/ tests/ src/ Functional/ ShortcutCacheTagsTest.php - Tests visibility and cacheability of shortcuts in the toolbar.
File
- core/
modules/ system/ tests/ src/ Functional/ Cache/ PageCacheTagsTestBase.php, line 67
Class
- PageCacheTagsTestBase
- Provides helper methods for page cache tags tests.
Namespace
Drupal\Tests\system\Functional\CacheCode
protected function verifyDynamicPageCache(Url $url, $hit_or_miss) {
$this
->drupalGet($url);
$this
->assertSession()
->responseHeaderEquals('X-Drupal-Dynamic-Cache', $hit_or_miss);
}