public function testCancelBatch()
 {
     $this->client->startBatch();
     $this->client->count("foobar", 4);
     $this->client->cancelBatch();
     $this->assertFalse($this->client->isBatch());
     $this->assertNull($this->connection->getLastMessage());
 }
Example #2
0
 /**
  * @inheritdoc
  */
 public function cancelBatch()
 {
     $this->client->cancelBatch();
 }
Example #3
0
 /**
  * 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);
 }
Example #4
0
 /**
  * Set metric
  *
  * @param string $key   Something like: 'userId'
  * @param mixed  $value 1234
  */
 private function set($key, $value)
 {
     $this->client->set($key, $value);
 }
Example #5
0
 public function testSet()
 {
     $this->client->set("barfoo", 666);
     $message = $this->connection->getLastMessage();
     $this->assertEquals('test.barfoo:666|s', $message);
 }