You are here

protected function ApdqcCacheTestCase::assertCacheExists in Asynchronous Prefetch Database Query Cache 7

Assert that a cache entry exists.

Parameters

string $message: Message to display.

mixed $var: The variable the cache should contain.

string $cid: The cache id.

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

1 call to ApdqcCacheTestCase::assertCacheExists()
ApdqcCacheIsEmptyCase::testIsEmpty in ./apdqc.test
Test clearing using a cid.

File

./apdqc.test, line 64
Tests for the Asynchronous Prefetch Database Query Cache module.

Class

ApdqcCacheTestCase
Add new functionality to DrupalWebTestCase.

Code

protected function assertCacheExists($message, $var = NULL, $cid = NULL, $bin = NULL) {
  if ($bin == NULL) {
    $bin = $this->defaultBin;
  }
  if ($cid == NULL) {
    $cid = $this->defaultCid;
  }
  if ($var == NULL) {
    $var = $this->defaultValue;
  }
  $this
    ->assertTrue($this
    ->checkCacheExists($cid, $var, $bin), $message);
}