1
0
mirror of https://github.com/Seldaek/monolog.git synced 2025-08-06 13:16:39 +02:00

Accept incomplete records in GelfMessageFormatter, closes #482

This commit is contained in:
Jordi Boggiano
2015-03-01 13:59:22 +00:00
parent 7532c41621
commit 5cd99de56d
2 changed files with 31 additions and 6 deletions

View File

@@ -80,6 +80,21 @@ class GelfMessageFormatterTest extends \PHPUnit_Framework_TestCase
$this->assertEquals(14, $message->getLine());
}
/**
* @covers Monolog\Formatter\GelfMessageFormatter::format
* @expectedException InvalidArgumentException
*/
public function testFormatInvalidFails()
{
$formatter = new GelfMessageFormatter();
$record = array(
'level' => Logger::ERROR,
'level_name' => 'ERROR',
);
$formatter->format($record);
}
/**
* @covers Monolog\Formatter\GelfMessageFormatter::format
*/