function CacheTestTrait::verifyDefaultCache

Verify that a given default cache entry exists with the correct cache tags.

Parameters

string[] $keys: The cache item keys.

array $tags: An array of expected cache tags.

\Drupal\Core\Cache\CacheableDependencyInterface $cacheability: The initial cacheability for the item.

1 call to CacheTestTrait::verifyDefaultCache()
ShortcutCacheTagsTest::testEntityCreation in core/modules/shortcut/tests/src/Kernel/ShortcutCacheTagsTest.php
Tests that when creating a shortcut, the shortcut set tag is invalidated.

File

core/modules/system/tests/src/Traits/CacheTestTrait.php, line 65

Class

CacheTestTrait
Provides helper methods for interacting with cache backends.

Namespace

Drupal\Tests\system\Traits

Code

protected function verifyDefaultCache(array $keys, array $tags, CacheableDependencyInterface $cacheability) : void {
    $this->verifyCache($this->getDefaultVariationCache(), $keys, $tags, $cacheability);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.