function AssertLegacyTrait::assertCacheTag
Same name in other branches
- 9 core/tests/Drupal/FunctionalTests/AssertLegacyTrait.php \Drupal\FunctionalTests\AssertLegacyTrait::assertCacheTag()
Asserts whether an expected cache tag was present in the last response.
Parameters
string $expected_cache_tag: The expected cache tag.
Deprecated in drupal:8.2.0 and is removed from drupal:10.0.0. Use $this->assertSession()->responseHeaderContains() instead.
23 calls to AssertLegacyTrait::assertCacheTag()
- BlockInstallTest::testCacheTagInvalidationUponInstallation in core/
modules/ block/ tests/ src/ Functional/ BlockInstallTest.php - BlockSystemBrandingTest::testSystemBrandingSettings in core/
modules/ block/ tests/ src/ Functional/ BlockSystemBrandingTest.php - Tests system branding block configuration.
- BookTest::testBook in core/
modules/ book/ tests/ src/ Functional/ BookTest.php - Tests book functionality through node interfaces.
- CacheabilityMetadataConfigOverrideIntegrationTest::testConfigOverride in core/
modules/ config/ tests/ src/ Functional/ CacheabilityMetadataConfigOverrideIntegrationTest.php - Tests if config overrides correctly set cacheability metadata.
- CommentAnonymousTest::testAnonymous in core/
modules/ comment/ tests/ src/ Functional/ CommentAnonymousTest.php - Tests anonymous comment functionality.
File
-
core/
tests/ Drupal/ FunctionalTests/ AssertLegacyTrait.php, line 716
Class
- AssertLegacyTrait
- Provides convenience methods for assertions in browser tests.
Namespace
Drupal\FunctionalTestsCode
protected function assertCacheTag($expected_cache_tag) {
$this->assertSession()
->responseHeaderContains('X-Drupal-Cache-Tags', $expected_cache_tag);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.