function MemCacheClearCase::testClearWildcardFull in Memcache API and Integration 6
Same name and namespace in other branches
- 7 tests/memcache.test \MemCacheClearCase::testClearWildcardFull()
- 7 tests/memcache6.test \MemCacheClearCase::testClearWildcardFull()
Test full bin flushes with no cache lifetime.
File
- tests/
memcache.test, line 226
Class
- MemCacheClearCase
- Test cache clearing methods.
Code
function testClearWildcardFull() {
variable_set("cache_flush_{$this->default_bin}", 0);
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.'));
}