I have just run into the same issue, I think it's just one of many limitations with the in build test framework
Jun 18, 2015
3
Level 2
Unable to test select fields with array names (5.1)
Hey all,
Currently trying to test some select and multiselect inputs but constantly getting this error and haven't been able to come up with a solution.
Here's an example test block:
$user = factory('App\Entities\Users\User')->create();
$this->actingAs($user)
->visit('/register/')
->select(4, 'industries[]')
->press('Complete Registration')
->seePageIs('/');
Unfortunately this produces the following error:
There was 1 error:
1) UserRegistrationTest::testUserRegister
Symfony\Component\CssSelector\Exception\SyntaxErrorException: Expected identifier or "*", but <delimiter "]" at 13> found.
Any idea if this is a bug? Or am I doing something wrong?
Thanks!
Please or to participate in this conversation.