public function addRequestSet(RequestSet $requests) { if (!$requests->hasRequests()) { return; } $value = $requests->getState(); $value = json_encode($value); $this->backend->appendValuesToList($this->key, array($value)); }
public function test_getNumValuesInList_shouldReturnNumberOfEntries_WhenListIsNotEmpty() { $this->redis->appendValuesToList($this->emptyListKey, array(12)); $this->assertNumberOfItemsInList($this->emptyListKey, 1); $this->redis->appendValuesToList($this->emptyListKey, array(3, 99, '488')); $this->assertNumberOfItemsInList($this->emptyListKey, 4); }