31 $time =
'2014-01-07T12:34';
33 $host = gethostname();
35 $handler = $this->getMockBuilder(
'\Monolog\Handler\SyslogUdpHandler')
36 ->setConstructorArgs(array(
"127.0.0.1", 514,
"authpriv"))
37 ->setMethods(array(
'getDateTime'))
45 $socket = $this->getMock(
'\Monolog\Handler\SyslogUdp\UdpSocket', array(
'write'), array(
'lol',
'lol'));
46 $socket->expects($this->at(0))
48 ->with(
"lol",
"<".(LOG_AUTHPRIV + LOG_WARNING).
">1 $time $host php $pid - - ");
49 $socket->expects($this->at(1))
51 ->with(
"hej",
"<".(LOG_AUTHPRIV + LOG_WARNING).
">1 $time $host php $pid - - ");
63 $socket = $this->getMock(
'\Monolog\Handler\SyslogUdp\UdpSocket', array(
'write'), array(
'lol',
'lol'));
64 $socket->expects($this->never())
74 return array(
'message' => $msg,
'level' => \
Monolog\
Logger::WARNING,
'context' => null,
'extra' => array(),
'channel' =>
'lol');
testWeValidateFacilities()
UnexpectedValueException
A Handler for logging to a remote syslogd server.
const WARNING
Exceptional occurrences that are not errors.
testSplitWorksOnEmptyMsg()
getRecordWithMessage($msg)