Is it possible to simulate/make an XMLHttpRequest request (ajax) in symfony2 tests?
After search with "Problematic" answer, the correct syntax is:
$crawler = $client->request('GET', '/foo/', array(), array(), array(
'HTTP_X-Requested-With' => 'XMLHttpRequest',
));
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With