use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Session\Session;
use Symfony\Component\HttpFoundation\Session\Storage\MockArraySessionStorage;
class RequestTest extends TestCase
{ use ExpectDeprecationTrait;
protected function tearDown(): void
{ Request::
setTrustedProxies([], -1
);
Request::
setTrustedHosts([]);
} public function testInitialize() { $request =
new Request();
$request->
initialize(['foo' => 'bar'
]);
$this->
assertEquals('bar',
$request->query->
get('foo'
), '->initialize() takes an array of query parameters as its first argument'
);
$request->
initialize([],
['foo' => 'bar'
]);
$this->
assertEquals('bar',
$request->request->
get('foo'
), '->initialize() takes an array of request parameters as its second argument'
);