public function testCancelBatch() { $this->client->startBatch(); $this->client->count("foobar", 4); $this->client->cancelBatch(); $this->assertFalse($this->client->isBatch()); $this->assertNull($this->connection->getLastMessage()); }
/** * @inheritdoc */ public function cancelBatch() { $this->client->cancelBatch(); }
/** * Creates a gauge in statsd. * * @static * * @param string $name the name of the key * @param string|int $amount the amount the gauge is increased */ public function gauge($name, $amount) { $this->statsd->gauge($name, $amount); }
/** * Set metric * * @param string $key Something like: 'userId' * @param mixed $value 1234 */ private function set($key, $value) { $this->client->set($key, $value); }
public function testSet() { $this->client->set("barfoo", 666); $message = $this->connection->getLastMessage(); $this->assertEquals('test.barfoo:666|s', $message); }