是否可以模拟/做出XMLHtt prequest请求(AJAX)的Symfony2的测试?
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',
));