You are here

protected function VariationCacheTest::assertVariationCacheMiss in VariationCache 8

Asserts that an item could not be retrieved from the variation cache.

Parameters

\Drupal\Core\Cache\CacheableMetadata $initial_cacheability: The initial cacheability that should be used.

4 calls to VariationCacheTest::assertVariationCacheMiss()
VariationCacheTest::testNestedVariations in tests/src/Unit/VariationCacheTest.php
Tests a cache item that has nested variations.
VariationCacheTest::testNestedVariationsSelfHealing in tests/src/Unit/VariationCacheTest.php
Tests a cache item that has nested variations that trigger self-healing.
VariationCacheTest::testSingleVariation in tests/src/Unit/VariationCacheTest.php
Tests a cache item that only ever varies by one context.
VariationCacheTest::testSplitVariationsSelfHealing in tests/src/Unit/VariationCacheTest.php
Tests self-healing for a cache item that has split variations.

File

tests/src/Unit/VariationCacheTest.php, line 449

Class

VariationCacheTest
@coversDefaultClass \Drupal\variationcache\Cache\VariationCache @group Cache

Namespace

Drupal\Tests\variationcache\Unit

Code

protected function assertVariationCacheMiss(CacheableMetadata $initial_cacheability) {
  $this
    ->assertFalse($this->variationCache
    ->get($this->cacheKeys, $initial_cacheability), 'Nothing could be retrieved for the active cache contexts.');
}