You are here

public function MemcacheTestCase::assertCacheRemoved in Memcache API and Integration 7

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

Assert or a cache entry has been removed.

Parameters

string $message: Message to display.

string $cid: Defaults to $this->default_cid. The cache id.

string $bin: Defaults to $this->default_bin. The bin the cache item was stored in.

File

tests/memcache.test, line 210
Test cases for the memcache cache backend.

Class

MemcacheTestCase
@file Test cases for the memcache cache backend.

Code

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