public function testFormatWithApplicationNameV1() { $formatter = new LogstashFormatter('app', 'test', null, 'ctxt_', LogstashFormatter::V1); $record = array('level' => Logger::ERROR, 'level_name' => 'ERROR', 'channel' => 'meh', 'context' => array('from' => 'logger'), 'datetime' => new \DateTime("@0"), 'extra' => array('key' => 'pair'), 'message' => 'log'); $message = json_decode($formatter->format($record), true); $this->assertArrayHasKey('type', $message); $this->assertEquals('app', $message['type']); }