protected function WebTestBase::assertNoCacheTag in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/modules/simpletest/src/WebTestBase.php \Drupal\simpletest\WebTestBase::assertNoCacheTag()
Asserts whether an expected cache tag was absent in the last response.
Parameters
string $cache_tag: The cache tag to check.
4 calls to WebTestBase::assertNoCacheTag()
- BlockInstallTest::testCacheTagInvalidationUponInstallation in core/
modules/ block/ src/ Tests/ BlockInstallTest.php - EarlyRenderingControllerTest::testEarlyRendering in core/
modules/ system/ src/ Tests/ Common/ EarlyRenderingControllerTest.php - Tests theme preprocess functions being able to attach assets.
- PageCacheTest::testPageCacheAnonymousRolePermissions in core/
modules/ page_cache/ src/ Tests/ PageCacheTest.php - Tests the automatic presence of the anonymous role's cache tag.
- SearchPageCacheTagsTest::testSearchText in core/
modules/ search/ src/ Tests/ SearchPageCacheTagsTest.php - Tests the presence of the expected cache tag in various situations.
File
- core/
modules/ simpletest/ src/ WebTestBase.php, line 3032 - Contains \Drupal\simpletest\WebTestBase.
Class
- WebTestBase
- Test case for typical Drupal tests.
Namespace
Drupal\simpletestCode
protected function assertNoCacheTag($cache_tag) {
$cache_tags = explode(' ', $this
->drupalGetHeader('X-Drupal-Cache-Tags'));
$this
->assertFalse(in_array($cache_tag, $cache_tags), "'" . $cache_tag . "' is absent in the X-Drupal-Cache-Tags header.");
}