HttpFoundation RequestTest - Fixed indentation and removed comments
This commit is contained in:
parent
48582402c0
commit
32fc4d8758
|
@ -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.');
|
||||
|
||||
|
|
Reference in New Issue