I'm doing some functional tests for an application done with Symfony2 (2.1) and I'm stuck with a problem.
I have some parts of the website that load when the user clicks a link or other element, but these actions are performed using jQuery and $.post calls. How can I get the Symfony2 crawler to do these calls?
When I do something like this:
$link = $crawler->filter('ul.line_menu a')->eq(1)->link();
$crawler = $client->click($link);
The crawler gets the "href" of the "a" element and launches it, but the "href" is empty, and a "click()" function is associated with this element, preventing the click action with "preventDefault()".
Thank you everyone!! :)