public function testAppend() { $reply = $this->list->append(123); $this->assertTrue($reply); $reply = $this->list->append(456); $this->assertTrue($reply); $values = $this->rediska->getFromList('test', 1); $this->assertEquals(456, $values); }
public function rpush($listName, $value) { $key = new \Rediska_Key_List($listName); try { $key->append($value); } catch (\Rediska_Exception $e) { throw new \VisitCounter\Exception\RedisException($e->getMessage(), 0, $e); } return true; }
public function testAppendWithoutCreate() { $reply = $this->list->append(123, false); $this->assertEquals(0, $reply); }
public function listAdd($listKey, $val = null) { $List = new Rediska_Key_List($listKey); $List->setRediska($this->Rediska); return $List->append($val); }