function CacheTestTrait::verifyRenderCache
Verify that a given render cache entry exists with the correct cache tags.
Parameters
string[] $keys: The render cache item keys.
array $tags: An array of expected cache tags.
\Drupal\Core\Cache\CacheableDependencyInterface $cacheability: The initial cacheability the item was rendered with.
3 calls to CacheTestTrait::verifyRenderCache()
- BlockContentCacheTagsTest::testBlock in core/
modules/ block_content/ tests/ src/ Functional/ BlockContentCacheTagsTest.php - Tests that the block is cached with the correct contexts and tags.
- EntityCacheTagsTestBase::testReferencedEntity in core/
modules/ system/ tests/ src/ Functional/ Entity/ EntityCacheTagsTestBase.php - Tests cache tags presence and invalidation of the entity when referenced.
- EntityWithUriCacheTagsTestBase::testEntityUri in core/
modules/ system/ tests/ src/ Functional/ Entity/ EntityWithUriCacheTagsTestBase.php - Tests cache tags presence and invalidation of the entity at its URI.
File
-
core/
modules/ system/ tests/ src/ Traits/ CacheTestTrait.php, line 51
Class
- CacheTestTrait
- Provides helper methods for interacting with cache backends.
Namespace
Drupal\Tests\system\TraitsCode
protected function verifyRenderCache(array $keys, array $tags, CacheableDependencyInterface $cacheability) : void {
$this->verifyCache($this->getRenderVariationCache(), $keys, $tags, $cacheability);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.