1
0
mirror of https://github.com/Seldaek/monolog.git synced 2025-07-29 17:30:14 +02:00

Fix of SyslogUdpHandler mock creation

'datetime' value inside of getRecordWithMessage() result is enough,
getDateTime() method is missing & not being used
This commit is contained in:
Victor Pryazhnikov
2021-02-27 15:54:03 +03:00
parent 240a159d44
commit 2bc1351c1e

View File

@@ -75,12 +75,9 @@ class SyslogUdpHandlerTest extends TestCase
$handler = $this->getMockBuilder('\Monolog\Handler\SyslogUdpHandler')
->setConstructorArgs(array("127.0.0.1", 514, "authpriv", 'debug', true, "php", \Monolog\Handler\SyslogUdpHandler::RFC3164))
->onlyMethods(array('getDateTime'))
->onlyMethods([])
->getMock();
$handler->method('getDateTime')
->willReturn($time);
$handler->setFormatter(new \Monolog\Formatter\ChromePHPFormatter());
$socket = $this->getMockBuilder('\Monolog\Handler\SyslogUdp\UdpSocket')