public function ClientTest::testRequestURIConversionByServerHost in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/symfony/browser-kit/Tests/ClientTest.php \Symfony\Component\BrowserKit\Tests\ClientTest::testRequestURIConversionByServerHost()
File
- vendor/
symfony/ browser-kit/ Tests/ ClientTest.php, line 227
Class
Namespace
Symfony\Component\BrowserKit\TestsCode
public function testRequestURIConversionByServerHost() {
$client = new TestClient();
$server = array(
'HTTP_HOST' => 'www.exampl+e.com:8000',
);
$parameters = array();
$files = array();
$client
->request('GET', 'http://exampl+e.com', $parameters, $files, $server);
$this
->assertEquals('http://www.exampl+e.com:8000', $client
->getRequest()
->getUri(), '->request() uses HTTP_HOST to add port');
$client
->request('GET', 'http://exampl+e.com:8888', $parameters, $files, $server);
$this
->assertEquals('http://www.exampl+e.com:8000', $client
->getRequest()
->getUri(), '->request() uses HTTP_HOST to modify existing port');
$client
->request('GET', 'http://exampl+e.com:8000', $parameters, $files, $server);
$this
->assertEquals('http://www.exampl+e.com:8000', $client
->getRequest()
->getUri(), '->request() uses HTTP_HOST respects correct set port');
}