public function RequestTest::testGetSchemeAndHttpHost in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/symfony/http-foundation/Tests/RequestTest.php \Symfony\Component\HttpFoundation\Tests\RequestTest::testGetSchemeAndHttpHost()
@covers Symfony\Component\HttpFoundation\Request::getSchemeAndHttpHost
File
- vendor/
symfony/ http-foundation/ Tests/ RequestTest.php, line 636
Class
Namespace
Symfony\Component\HttpFoundation\TestsCode
public function testGetSchemeAndHttpHost() {
$request = new Request();
$server = array();
$server['SERVER_NAME'] = 'servername';
$server['SERVER_PORT'] = '90';
$request
->initialize(array(), array(), array(), array(), array(), $server);
$this
->assertEquals('http://servername:90', $request
->getSchemeAndHttpHost());
$server['PHP_AUTH_USER'] = 'fabien';
$request
->initialize(array(), array(), array(), array(), array(), $server);
$this
->assertEquals('http://servername:90', $request
->getSchemeAndHttpHost());
$server['PHP_AUTH_USER'] = '0';
$request
->initialize(array(), array(), array(), array(), array(), $server);
$this
->assertEquals('http://servername:90', $request
->getSchemeAndHttpHost());
$server['PHP_AUTH_PW'] = '0';
$request
->initialize(array(), array(), array(), array(), array(), $server);
$this
->assertEquals('http://servername:90', $request
->getSchemeAndHttpHost());
}