ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
Monolog\Handler\SyslogUdpHandlerTest Class Reference

extension sockets More...

+ Inheritance diagram for Monolog\Handler\SyslogUdpHandlerTest:
+ Collaboration diagram for Monolog\Handler\SyslogUdpHandlerTest:

Public Member Functions

 testWeValidateFacilities ()
 UnexpectedValueException More...
 
 testWeSplitIntoLines ()
 

Protected Member Functions

 getRecordWithMessage ($msg)
 

Detailed Description

extension sockets

Definition at line 17 of file SyslogUdpHandlerTest.php.

Member Function Documentation

◆ getRecordWithMessage()

Monolog\Handler\SyslogUdpHandlerTest::getRecordWithMessage (   $msg)
protected

Definition at line 45 of file SyslogUdpHandlerTest.php.

References array, and Monolog\Logger\WARNING.

Referenced by Monolog\Handler\SyslogUdpHandlerTest\testWeSplitIntoLines().

46  {
47  return array('message' => $msg, 'level' => \Monolog\Logger::WARNING, 'context' => null, 'extra' => array(), 'channel' => 'lol');
48  }
const WARNING
Exceptional occurrences that are not errors.
Definition: Logger.php:52
Create styles array
The data for the language used.
+ Here is the caller graph for this function:

◆ testWeSplitIntoLines()

Monolog\Handler\SyslogUdpHandlerTest::testWeSplitIntoLines ( )

Definition at line 27 of file SyslogUdpHandlerTest.php.

References $handler, array, and Monolog\Handler\SyslogUdpHandlerTest\getRecordWithMessage().

28  {
29  $handler = new SyslogUdpHandler("127.0.0.1", 514, "authpriv");
30  $handler->setFormatter(new \Monolog\Formatter\ChromePHPFormatter());
31 
32  $socket = $this->getMock('\Monolog\Handler\SyslogUdp\UdpSocket', array('write'), array('lol', 'lol'));
33  $socket->expects($this->at(0))
34  ->method('write')
35  ->with("lol", "<".(LOG_AUTHPRIV + LOG_WARNING).">1 ");
36  $socket->expects($this->at(1))
37  ->method('write')
38  ->with("hej", "<".(LOG_AUTHPRIV + LOG_WARNING).">1 ");
39 
40  $handler->setSocket($socket);
41 
42  $handler->handle($this->getRecordWithMessage("hej\nlol"));
43  }
Create styles array
The data for the language used.
$handler
+ Here is the call graph for this function:

◆ testWeValidateFacilities()

Monolog\Handler\SyslogUdpHandlerTest::testWeValidateFacilities ( )

UnexpectedValueException

Definition at line 22 of file SyslogUdpHandlerTest.php.

References $handler.

23  {
24  $handler = new SyslogUdpHandler("ip", null, "invalidFacility");
25  }
$handler

The documentation for this class was generated from the following file: