You are here

public function MemCacheClearCase::testClearWildcardFull in Memcache API and Integration 7

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

Test full bin flushes with no cache lifetime.

File

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

Class

MemCacheClearCase
Test cache clearing methods.

Code

public function testClearWildcardFull() {
  cache_set('test_cid_clear1', $this->default_value, $this->default_bin);
  cache_set('test_cid_clear2', $this->default_value, $this->default_bin);
  $this
    ->assertTrue($this
    ->checkCacheExists('test_cid_clear1', $this->default_value) && $this
    ->checkCacheExists('test_cid_clear2', $this->default_value), t('Two caches were created for checking cid "*" with wildcard true.'));
  cache_clear_all('*', $this->default_bin, TRUE);
  $this
    ->assertFalse($this
    ->checkCacheExists('test_cid_clear1', $this->default_value) || $this
    ->checkCacheExists('test_cid_clear2', $this->default_value), t('Two caches removed after clearing cid "*" with wildcard true.'));
}