Skip to content

Commit c4393a5

Browse files
committed
update test to check default value for rfc parameter
1 parent de13980 commit c4393a5

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
@@ -430,6 +430,26 @@ public function testWithSyslogUdpHandler()
430430
$this->assertEquals(514, $config['handlers']['syslogudp']['port']);
431431
$this->assertEquals(0, $config['handlers']['syslogudp']['rfc']);
432432

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

0 commit comments

Comments
 (0)