1
0
mirror of https://github.com/Seldaek/monolog.git synced 2025-07-30 18:00:17 +02:00

Fix unique_id in WebProcessor not being disableable, fixes #1470

This commit is contained in:
Jordi Boggiano
2020-07-08 20:59:21 +02:00
parent 6eee2fa4d4
commit c3a05db90c
2 changed files with 17 additions and 4 deletions

View File

@@ -88,6 +88,19 @@ class WebProcessorTest extends TestCase
$this->assertSame(array('url' => 'A', 'http_method' => 'C'), $record['extra']);
}
public function testProcessorAddsOnlyRequestedExtraFieldsIncludingOptionalFields()
{
$server = array(
'REQUEST_URI' => 'A',
'UNIQUE_ID' => 'X',
);
$processor = new WebProcessor($server, array('url'));
$record = $processor($this->getRecord());
$this->assertSame(array('url' => 'A'), $record['extra']);
}
public function testProcessorConfiguringOfExtraFields()
{
$server = array(