$request->
initialize([],
[],
[],
[],
[],
$server);
$this->
assertEquals('http://host:8080/ba%20se/index_dev.php/foo%20bar/in+fo?query=string',
$request->
getUri());
$server['PHP_AUTH_PW'
] = 'symfony';
$request->
initialize([],
[],
[],
[],
[],
$server);
$this->
assertEquals('http://host:8080/ba%20se/index_dev.php/foo%20bar/in+fo?query=string',
$request->
getUri());
} public function testGetUriForPath() { $request = Request::
create('http://test.com/foo?bar=baz'
);
$this->
assertEquals('http://test.com/some/path',
$request->
getUriForPath('/some/path'
));
$request = Request::
create('http://test.com:90/foo?bar=baz'
);
$this->
assertEquals('http://test.com:90/some/path',
$request->
getUriForPath('/some/path'
));
$request = Request::
create('https://test.com/foo?bar=baz'
);
$this->
assertEquals('https://test.com/some/path',
$request->
getUriForPath('/some/path'
));
$request = Request::
create('https://test.com:90/foo?bar=baz'
);
$this->
assertEquals('https://test.com:90/some/path',
$request->
getUriForPath('/some/path'
));
$server =
[];