Skip to content

Commit 285fd77

Browse files
committed
update test to check default value for rfc parameter
1 parent bcdb0eb commit 285fd77

File tree

1 file changed

+21
-1
lines changed

1 file changed

+21
-1
lines changed

Tests/DependencyInjection/ConfigurationTest.php

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -431,6 +431,26 @@ public function testWithSyslogUdpHandler()
431431
$this->assertEquals(514, $config['handlers']['syslogudp']['port']);
432432
$this->assertEquals(0, $config['handlers']['syslogudp']['rfc']);
433433

434+
$configs = [
435+
[
436+
'handlers' => [
437+
'syslogudp' => [
438+
'type' => 'syslogudp',
439+
'host' => '127.0.0.1',
440+
'port' => 514,
441+
'facility' => 'USER',
442+
'level' => 'ERROR'
443+
]
444+
]
445+
]
446+
];
447+
$config = $this->process($configs);
448+
449+
$this->assertEquals('syslogudp', $config['handlers']['syslogudp']['type']);
450+
$this->assertEquals('127.0.0.1', $config['handlers']['syslogudp']['host']);
451+
$this->assertEquals(514, $config['handlers']['syslogudp']['port']);
452+
$this->assertEquals(1, $config['handlers']['syslogudp']['rfc']);
453+
434454
$configs = [
435455
[
436456
'handlers' => [
@@ -440,7 +460,7 @@ public function testWithSyslogUdpHandler()
440460
'port' => 514,
441461
'facility' => 'USER',
442462
'level' => 'ERROR',
443-
'rfc' => SyslogUdpHandler::RFC5424e
463+
'rfc' => 2
444464
]
445465
]
446466
]

0 commit comments

Comments
 (0)