You are here

function MemcacheTestCase::assertCacheRemoved in Memcache API and Integration 6

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

Assert or a cache entry has been removed.

Parameters

$message: Message to display.

$cid: The cache id.

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

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

File

tests/memcache.test, line 70

Class

MemcacheTestCase

Code

function assertCacheRemoved($message, $cid = NULL, $bin = NULL) {
  if ($bin == NULL) {
    $bin = $this->default_bin;
  }
  if ($cid == NULL) {
    $cid = $this->default_cid;
  }
  $cache = cache_get($cid, $bin);
  $this
    ->assertFalse($cache, $message);
}