Beispiel #1
0
 public function testLTrim()
 {
     $this->_client->lPush('foo', 'bar1');
     $this->_client->lPush('foo', 'bar2');
     $this->_client->lPush('foo', 'bar3');
     $this->_client->lTrim('foo', 1, 1);
     $this->assertSame(array('bar2'), $this->_client->lRange('foo'));
 }
Beispiel #2
0
 /**
  * @expectedException CM_Exception_Invalid
  * @expectedExceptionMessage does not contain a list
  */
 public function testLTrimNotList()
 {
     $this->_client->zAdd('foo', 2, 'bar');
     $this->_client->lTrim('foo', 1, 1);
 }