/** * @test */ public function flushFlushesCache() { for ($i = 0; $i < 10; $i++) { $this->backend->set('entry_' . $i, 'foo', array('tag1')); } $this->assertTrue($this->backend->has('entry_5')); $this->backend->flush(); $this->assertFalse($this->backend->has('entry_5')); }
/** * @test Implementation */ public function flushRemovesAllEntriesFromCache() { $this->setUpBackend(); $this->setUpRedis(); $identifier = 'identifier' . uniqid(); $this->backend->set($identifier, 'data'); $this->backend->flush(); $this->assertSame(array(), $this->redis->getKeys('*')); }