Esempio n. 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'));
 }
Esempio n. 2
0
 /**
  * @param string $key
  * @param string $value
  */
 public function add($key, $value)
 {
     $this->_redisClient->sAdd($key, $value);
 }