protected function CacheTestBase::assertCacheExists

Asserts that a cache entry exists.

Parameters

$message: Message to display.

$var: The variable the cache should contain.

$cid: The cache id.

$bin: The bin the cache item was stored in.

File

drupal/core/modules/system/lib/Drupal/system/Tests/Cache/CacheTestBase.php, line 55
Definition of Drupal\system\Tests\Cache\CacheTestBase.

Class

CacheTestBase
Provides helper methods for cache tests.

Namespace

Drupal\system\Tests\Cache

Code

protected function assertCacheExists($message, $var = NULL, $cid = NULL, $bin = NULL) {
  if ($bin == NULL) {
    $bin = $this->default_bin;
  }
  if ($cid == NULL) {
    $cid = $this->default_cid;
  }
  if ($var == NULL) {
    $var = $this->default_value;
  }
  $this
    ->assertTrue($this
    ->checkCacheExists($cid, $var, $bin), $message);
}