merged branch pborreli/request-time (PR #5079)

Commits
-------

3e4c9b2 [Routing] Fixed alteration of $_SERVER

Discussion
----------

[Routing] Fixed alteration of $_SERVER

For test purpose [a method](https://github.com/symfony/symfony/blob/master/src/Symfony/Component/Routing/Tests/Matcher/ApacheUrlMatcherTest.php#L29) is altering $_SERVER variable.

One visible effect : phpunit crashes when trying to render coverage as it use $_SERVER['REQUEST_TIME'] which just have been unsetted by this test method.
This commit is contained in:
Fabien Potencier 2012-07-27 13:20:06 +02:00
commit 21d4973f79

View File

@ -17,6 +17,18 @@ use Symfony\Component\Routing\Matcher\ApacheUrlMatcher;
class ApacheUrlMatcherTest extends \PHPUnit_Framework_TestCase
{
protected $server;
protected function setUp()
{
$this->server = $_SERVER;
}
protected function tearDown()
{
$_SERVER = $this->server;
}
/**
* @dataProvider getMatchData
*/