public function testEndBatch() { $this->client->startBatch(); $this->client->count("foobar", 1); $this->client->count("foobar", 2); $this->client->endBatch(); $this->assertFalse($this->client->isBatch()); $this->assertSame("foobar:1|c\nfoobar:2|c", $this->connection->getLastMessage()); // run a new batch => don't send the old values! $this->client->startBatch(); $this->client->count("baz", 100); $this->client->count("baz", 300); $this->client->endBatch(); $this->assertFalse($this->client->isBatch()); $this->assertSame("baz:100|c\nbaz:300|c", $this->connection->getLastMessage()); }
/** * @inheritdoc */ public function endBatch() { $this->client->endBatch(); }