public function testBuildCounterOp() { $op = DataType::buildCounterOp(static::COUNTER_INCREMENT, false); $this->counterOpAssertions($op); $op = DataType::buildCounterOp(static::COUNTER_INCREMENT, true); $this->assertInstanceOf('Basho\\Riak\\Api\\Pb\\Message\\DtOp', $op); $this->counterOpAssertions($op->getCounterOp()); }
/** * @param $increment * @return Pb\Message\DtUpdateReq */ protected function buildCounterUpdateMessage($increment) { $message = $this->buildDataTypeMessage(); $message->setOp(Api\Pb\Translator\DataType::buildCounterOp($increment, true)); return $message; }