Answer the question
In order to leave comments, you need to log in
Symfony2 ajax qjuery and unit test?
I am writing functional tests, I ran into a problem, when choosing an ajax link and clicking on it, nothing happens.
$client = static::createClient();
$crawler = $client->request('GET', '/');
$link = $crawler->selectLink("I'm ajax link")->link();
$client->click($link);
$('#ajaxLink').on('click', function(){test();});
Answer the question
In order to leave comments, you need to log in
Symfony doesn't know ajax out of the box. Here you need to look somewhere in the direction of other tools like Mink or casperjs.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question