I'm writing some tests for a form I've written in Laravel 5.1 but I'm getting an error saying:
Symfony\Component\CssSelector\Exception\SyntaxErrorException: Expected identifier or "*", but <number "1" at 11> found.
The issue is that I'm using 'array' names for some of my fields.
It's a series of questions and I'm using the question ID to map answers:
<label>Your answer for question 1?
<textarea name="question[1]"></textarea>
<label>
<label>Your answer for question 2?
<textarea name="question[2]"></textarea>
<label>
Then my test looks like this:
$response = $this->actingAs($user)
->visit('/application/project/1/1')
->type('This is a new title', 'title')
->type('My Question one Answer', 'question[1]')
->press('Save & Next Page');
I assume I need to present question[1] differently but I can't see how.