protected function CacheTestCase::assertCacheExists

7.x cache.test protected CacheTestCase::assertCacheExists($message, $var = NULL, $cid = NULL, $bin = NULL)

Assert or 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.

2 calls to CacheTestCase::assertCacheExists()
CacheClearCase::testClearCid in drupal/modules/simpletest/tests/cache.test
Test clearing using a cid.
CacheIsEmptyCase::testIsEmpty in drupal/modules/simpletest/tests/cache.test
Test clearing using a cid.

File

drupal/modules/simpletest/tests/cache.test, line 42

Class

CacheTestCase

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);
}