ILIAS  release_5-1 Revision 5.0.0-5477-g43f3e3fab5f
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}
testConstructInvalidFacility()
@covers Monolog\Handler\SyslogHandler::__construct
testConstruct()
@covers Monolog\Handler\SyslogHandler::__construct
Logs to syslog service.
Monolog log channel.
Definition: Logger.php:28
const DEBUG
Detailed debug information.
Definition: Logger.php:32