Beispiel #1
0
 public function testSFlush()
 {
     $this->_client->sAdd('foo', 'bar1');
     $this->_client->sAdd('foo', 'bar2');
     $this->_client->sAdd('foo', 'bar3');
     $this->assertSame(3, $this->_client->sCard('foo'));
     $members = $this->_client->sFlush('foo');
     sort($members);
     $this->assertSame(['bar1', 'bar2', 'bar3'], $members);
     $this->assertSame(0, $this->_client->sCard('foo'));
 }
Beispiel #2
0
 /**
  * @param string $key
  * @return string[]
  */
 public function flush($key)
 {
     return $this->_redisClient->sFlush($key);
 }