コード例 #1
0
 /**
  * @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'));
 }
コード例 #2
0
 /**
  * @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('*'));
 }