|
|
@@ -88,6 +88,21 @@ class WebProcessorTest extends TestCase
|
|
|
$this->assertSame(array('url' => 'A', 'http_method' => 'C'), $record['extra']);
|
|
|
}
|
|
|
|
|
|
+ public function testProcessorConfiguringOfExtraFields()
|
|
|
+ {
|
|
|
+ $server = array(
|
|
|
+ 'REQUEST_URI' => 'A',
|
|
|
+ 'REMOTE_ADDR' => 'B',
|
|
|
+ 'REQUEST_METHOD' => 'C',
|
|
|
+ 'SERVER_NAME' => 'F',
|
|
|
+ );
|
|
|
+
|
|
|
+ $processor = new WebProcessor($server, array('url' => 'REMOTE_ADDR'));
|
|
|
+ $record = $processor($this->getRecord());
|
|
|
+
|
|
|
+ $this->assertSame(array('url' => 'B'), $record['extra']);
|
|
|
+ }
|
|
|
+
|
|
|
/**
|
|
|
* @expectedException UnexpectedValueException
|
|
|
*/
|