public function Redis_Tests_Cache_AbstractFlushUnitTestCase::testFlushIsNothing in Redis 7.2
Test that the flush nothing flush mode flushes nothing.
File
- lib/
Redis/ Tests/ Cache/ AbstractFlushUnitTestCase.php, line 31
Class
Code
public function testFlushIsNothing() {
global $conf;
$conf['redis_flush_mode_cache'] = 0;
$backend = $this
->getBackend();
$this
->assertEqual(Redis_Cache_Base::FLUSH_NOTHING, $backend
->getClearMode());
$backend
->set('test4', 42, CACHE_PERMANENT);
$backend
->set('test5', 'foo', CACHE_TEMPORARY);
$backend
->set('test6', 'bar', time() + 10);
$backend
->clear();
$cache = $backend
->get('test4');
$this
->assertNotEqual(false, $cache);
$this
->assertEqual($cache->data, 42);
$cache = $backend
->get('test5');
$this
->assertNotEqual(false, $cache);
$this
->assertEqual($cache->data, 'foo');
$cache = $backend
->get('test6');
$this
->assertNotEqual(false, $cache);
$this
->assertEqual($cache->data, 'bar');
}