public function formatBatch(array $records)
{
$output = array();
foreach ($records as $record) {
$output = array_merge($output, $this->format($record));
}
return $output;
}
public function testBatchFormat() { $formatter = new StatsDFormatter(null, 2); $message = $formatter->formatBatch(array(array('level_name' => 'CRITICAL', 'channel' => 'test', 'message' => 'bar', 'context' => array(), 'datetime' => new \DateTime(), 'extra' => array()), array('level_name' => 'WARNING', 'channel' => 'log', 'message' => 'foo', 'context' => array(), 'datetime' => new \DateTime(), 'extra' => array()))); $this->assertEquals(array('test.CRITICAL.bar', 'log.WARNING.foo'), $message); }