You are here

function MemCacheClearCase::testClearWildcardFull in Zircon Profile 8

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

Test full bin flushes with no cache lifetime.

File

modules/memcache/tests/memcache.test, line 287

Class

MemCacheClearCase
Test cache clearing methods.

Code

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.'));
}