Reputation: 4730
If I have a functional test like:
public function testCreate()
{
$client = $this->makeClient();
$crawler = $client->request('POST', "/post/new");
$form = $crawler->selectButton("Create Post")->form();
$values = $form->getPhpValues();
$values['post']['title'] = 'test';
$values['post']['content'] = null; // Should fail because it isn't a string.
$crawler = $client->request($form->getMethod(), $form->getUri(), $values,
$form->getPhpFiles());
assertEquals() // What goes here?
}
How do I use the crawler
to get the form errors and compare them?
Upvotes: 1
Views: 969
Reputation: 5881
I see two possible solutions for you:
Upvotes: 2