I'm trying to send a form with PHPUnit. I followed the official documentation but I don't know what I'm doing wrong...
$client = static::createClient();
$crawler = $client->request('GET', '/demo/create/');
$form = $crawler->selectButton('Create Button')->form();
I have a submit button with Create Button text, but when I try the PHPUnit test I get the following error:
InvalidArgumentException: The current node list is empty.
I also tried filtering with form ID, but same error... What I'm doing wrong? I've created the form with the Form from Symfony 2.
Thanks.