public function testSetTrustedHostsDoesNotBreakOnSpecialCharacters() { Request::
setTrustedHosts(['localhost(\.local){0,1}#,example.com', 'localhost'
]);
$request = Request::
create('/'
);
$request->headers->
set('host', 'localhost'
);
$this->
assertSame('localhost',
$request->
getHost());
} public function testFactory() { Request::
setFactory(fn (array
$query =
[], array
$request =
[], array
$attributes =
[], array
$cookies =
[], array
$files =
[], array
$server =
[],
$content = null
) =>
new NewRequest());
$this->
assertEquals('foo', Request::
create('/'
)->
getFoo());
Request::
setFactory(null
);
} /**
* @dataProvider getLongHostNames
*/
public function testVeryLongHosts($host) {