HttpFoundation RequestTest - Fixed indentation and removed comments
This commit is contained in:
parent
48582402c0
commit
32fc4d8758
|
@ -727,21 +727,18 @@ class RequestTest extends \PHPUnit_Framework_TestCase
|
||||||
|
|
||||||
$this->assertEquals(80, $port, 'If X_FORWARDED_PROTO is set to http return 80.');
|
$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(
|
$request = Request::create('http://example.com', 'GET', array(), array(), array(), array(
|
||||||
'HTTP_X_FORWARDED_PROTO' => 'On'
|
'HTTP_X_FORWARDED_PROTO' => 'On'
|
||||||
));
|
));
|
||||||
$port = $request->getPort();
|
$port = $request->getPort();
|
||||||
$this->assertEquals(443, $port, 'With only PROTO set and value is On, getPort() defaults to 443.');
|
$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(
|
$request = Request::create('http://example.com', 'GET', array(), array(), array(), array(
|
||||||
'HTTP_X_FORWARDED_PROTO' => '1'
|
'HTTP_X_FORWARDED_PROTO' => '1'
|
||||||
));
|
));
|
||||||
$port = $request->getPort();
|
$port = $request->getPort();
|
||||||
$this->assertEquals(443, $port, 'With only PROTO set and value is 1, getPort() defaults to 443.');
|
$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(
|
$request = Request::create('http://example.com', 'GET', array(), array(), array(), array(
|
||||||
'HTTP_X_FORWARDED_PROTO' => 'something-else'
|
'HTTP_X_FORWARDED_PROTO' => 'something-else'
|
||||||
));
|
));
|
||||||
|
|
Reference in New Issue