ILIAS
release_5-4 Revision v5.4.26-12-gabc799a52e6
◀ ilDoc Overview
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
16
class
SyslogHandlerTest
extends
\PHPUnit_Framework_TestCase
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
}
Monolog\Handler
Definition:
AbstractHandler.php:12
Monolog\Logger\DEBUG
const DEBUG
Detailed debug information.
Definition:
Logger.php:33
Monolog\Handler\SyslogHandler
Logs to syslog service.
Definition:
SyslogHandler.php:29
PHPUnit_Framework_TestCase
Monolog\Handler\SyslogHandlerTest
Definition:
SyslogHandlerTest.php:16
Logger
Monolog\Handler\SyslogHandlerTest\testConstruct
testConstruct()
Monolog::__construct
Definition:
SyslogHandlerTest.php:21
php
$handler
$handler
Definition:
resumelogout.php:11
Monolog\Handler\SyslogHandlerTest\testConstructInvalidFacility
testConstructInvalidFacility()
Monolog::__construct
Definition:
SyslogHandlerTest.php:39
libs
composer
vendor
monolog
monolog
tests
Monolog
Handler
SyslogHandlerTest.php
Generated on Thu Jan 16 2025 19:01:44 for ILIAS by
1.8.13 (using
Doxyfile
)