mirror of
https://github.com/Seldaek/monolog.git
synced 2025-08-05 04:37:38 +02:00
Add unique_id to extra data only if present in the server environment
This commit is contained in:
@@ -60,6 +60,19 @@ class WebProcessorTest extends TestCase
|
||||
$this->assertNull($record['extra']['referrer']);
|
||||
}
|
||||
|
||||
public function testProcessorDoesNotAddUniqueIdIfNotPresent()
|
||||
{
|
||||
$server = array(
|
||||
'REQUEST_URI' => 'A',
|
||||
'REMOTE_ADDR' => 'B',
|
||||
'REQUEST_METHOD' => 'C',
|
||||
'SERVER_NAME' => 'F',
|
||||
);
|
||||
$processor = new WebProcessor($server);
|
||||
$record = $processor($this->getRecord());
|
||||
$this->assertFalse(isset($record['extra']['unique_id']));
|
||||
}
|
||||
|
||||
/**
|
||||
* @expectedException UnexpectedValueException
|
||||
*/
|
||||
|
Reference in New Issue
Block a user