HttpFoundation RequestTest - Fixed indentation and removed comments

This commit is contained in:
fturmel 2013-09-15 09:52:15 -04:00 committed by Fabien Potencier
parent 48582402c0
commit 32fc4d8758
1 changed files with 6 additions and 9 deletions

View File

@ -727,24 +727,21 @@ class RequestTest extends \PHPUnit_Framework_TestCase
$this->assertEquals(80, $port, 'If X_FORWARDED_PROTO is set to http return 80.');
//On
$request = Request::create('http://example.com', 'GET', array(), array(), array(), array(
'HTTP_X_FORWARDED_PROTO' => 'On'
));
'HTTP_X_FORWARDED_PROTO' => 'On'
));
$port = $request->getPort();
$this->assertEquals(443, $port, 'With only PROTO set and value is On, getPort() defaults to 443.');
//1
$request = Request::create('http://example.com', 'GET', array(), array(), array(), array(
'HTTP_X_FORWARDED_PROTO' => '1'
));
'HTTP_X_FORWARDED_PROTO' => '1'
));
$port = $request->getPort();
$this->assertEquals(443, $port, 'With only PROTO set and value is 1, getPort() defaults to 443.');
//something-else
$request = Request::create('http://example.com', 'GET', array(), array(), array(), array(
'HTTP_X_FORWARDED_PROTO' => 'something-else'
));
'HTTP_X_FORWARDED_PROTO' => 'something-else'
));
$port = $request->getPort();
$this->assertEquals(80, $port, 'With only PROTO set and value is not recognized, getPort() defaults to 80.');