ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
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 
12 namespace Monolog\Handler;
13 
14 use Monolog\Logger;
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 
39  public function testConstructInvalidFacility()
40  {
41  $this->setExpectedException('UnexpectedValueException');
42  $handler = new SyslogHandler('test', 'unknown');
43  }
44 }
const DEBUG
Detailed debug information.
Definition: Logger.php:32
Logs to syslog service.
testConstruct()
Monolog::__construct
$handler
testConstructInvalidFacility()
Monolog::__construct