default_bin; } $cached = cache($bin)->get($cid); return isset($cached->data) && $cached->data == $var; } /** * Assert or a cache entry exists. * * @param $message * Message to display. * @param $var * The variable the cache should contain. * @param $cid * The cache id. * @param $bin * The bin the cache item was stored in. */ 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); } /** * Assert or a cache entry has been removed. * * @param $message * Message to display. * @param $cid * The cache id. * @param $bin * The bin the cache item was stored in. */ function assertCacheRemoved($message, $cid = NULL, $bin = NULL) { if ($bin == NULL) { $bin = $this->default_bin; } if ($cid == NULL) { $cid = $this->default_cid; } $cached = cache($bin)->get($cid); $this->assertFalse($cached, $message); } /** * Performs a general wipe of the bin. * * @param $bin * The bin to perform the wipe on. */ protected function generalWipe($bin = NULL) { if ($bin == NULL) { $bin = $this->default_bin; } cache($bin)->expire(); } }