ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
SyslogHandlerTest.php
Go to the documentation of this file.
1<?php
2
3/*
4 * This file is part of the Monolog package.
5 *
6 * (c) Jordi Boggiano <j.boggiano@seld.be>
7 *
8 * For the full copyright and license information, please view the LICENSE
9 * file that was distributed with this source code.
10 */
11
12namespace Monolog\Handler;
13
15
17{
21 public function testConstruct()
22 {
23 $handler = new SyslogHandler('test');
24 $this->assertInstanceOf('Monolog\Handler\SyslogHandler', $handler);
25
26 $handler = new SyslogHandler('test', LOG_USER);
27 $this->assertInstanceOf('Monolog\Handler\SyslogHandler', $handler);
28
29 $handler = new SyslogHandler('test', 'user');
30 $this->assertInstanceOf('Monolog\Handler\SyslogHandler', $handler);
31
32 $handler = new SyslogHandler('test', LOG_USER, Logger::DEBUG, true, LOG_PERROR);
33 $this->assertInstanceOf('Monolog\Handler\SyslogHandler', $handler);
34 }
35
40 {
41 $this->setExpectedException('UnexpectedValueException');
42 $handler = new SyslogHandler('test', 'unknown');
43 }
44}
An exception for terminatinating execution or to throw for unit testing.
testConstructInvalidFacility()
@covers Monolog\Handler\SyslogHandler::__construct
testConstruct()
@covers Monolog\Handler\SyslogHandler::__construct
Logs to syslog service.
Monolog log channel.
Definition: Logger.php:29
const DEBUG
Detailed debug information.
Definition: Logger.php:33
$handler