merged branch michal-pipa/WebProcessorTest-fix (PR #4064)

Commits
-------

dff92e7 [Bridge][Monolog] Fixed WebProcessorTest

Discussion
----------

[Bridge][Monolog] Fixed WebProcessorTest

Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes [![Build Status](https://secure.travis-ci.org/michal-pipa/symfony.png?branch=WebProcessorTest-fix)](http://travis-ci.org/michal-pipa/symfony)
Fixes the following tickets: -
Todo: -

Fixed WebProcessorTest in compliance with latest monolog changes: Seldaek/monolog@3c4bc178cc.

Test was failing with message: `Symfony\Bridge\Monolog\Tests\Processor\WebProcessorTest::testUsesRequestServerData
Undefined index: SERVER_NAME`

---------------------------------------------------------------------------

by ManuelAC at 2012-04-22T13:47:59Z

👍

---------------------------------------------------------------------------

by willdurand at 2012-04-22T13:49:27Z

👍
This commit is contained in:
Fabien Potencier 2012-04-22 18:25:16 +02:00
commit 0d5d7c1bf1

View File

@ -30,6 +30,8 @@ class WebProcessorTest extends \PHPUnit_Framework_TestCase
'REQUEST_URI' => 'A',
'REMOTE_ADDR' => 'B',
'REQUEST_METHOD' => 'C',
'SERVER_NAME' => 'D',
'HTTP_REFERER' => 'E'
);
$request = new Request();
@ -41,6 +43,8 @@ class WebProcessorTest extends \PHPUnit_Framework_TestCase
$this->assertEquals($server['REQUEST_URI'], $record['extra']['url']);
$this->assertEquals($server['REMOTE_ADDR'], $record['extra']['ip']);
$this->assertEquals($server['REQUEST_METHOD'], $record['extra']['http_method']);
$this->assertEquals($server['SERVER_NAME'], $record['extra']['server']);
$this->assertEquals($server['HTTP_REFERER'], $record['extra']['referrer']);
}
/**