You are here

protected function MemcacheTestCase::assertCacheExists in Memcache API and Integration 6

Same name and namespace in other branches
  1. 7 tests/memcache.test \MemcacheTestCase::assertCacheExists()
  2. 7 tests/memcache6.test \MemcacheTestCase::assertCacheExists()

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.

1 call to MemcacheTestCase::assertCacheExists()
MemCacheClearCase::clearCidTest in tests/memcache.test
Test clearing using a cid.

File

tests/memcache.test, line 46

Class

MemcacheTestCase

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