1
0
mirror of https://github.com/Seldaek/monolog.git synced 2025-08-12 08:04:02 +02:00

Combine common syslog handlers functionality, refs #258

This commit is contained in:
Jordi Boggiano
2013-10-31 22:17:55 +01:00
parent 814cfa3c12
commit b8967466bc
5 changed files with 115 additions and 127 deletions

View File

@@ -7,16 +7,16 @@ use Monolog\TestCase;
class SyslogUdpHandlerTest extends \PHPUnit_Framework_TestCase
{
/**
* @expectedException InvalidArgumentException
* @expectedException UnexpectedValueException
*/
public function testWeValidateFacilities()
{
$handler = new SyslogUdpHandler("loiwjefoiwjef", "ip");
$handler = new SyslogUdpHandler("ip", null, "invalidFacility");
}
public function testWeSplitIntoLines()
{
$handler = new SyslogUdpHandler("local5", "127.0.0.1");
$handler = new SyslogUdpHandler("127.0.0.1", 514, "local5");
$handler->setFormatter(new \Monolog\Formatter\ChromePHPFormatter());
$socket = $this->getMock('\Monolog\Handler\SyslogUdp\UdpSocket', array('write'), array('lol', 'lol'));