mardi 22 septembre 2015

PHP Unit with square bracket ( [ ) for text field name

I am testing a web project using Laracasts\Integrated library (with PHPUNIT).

I have a following HTML form:

<input type="text" name = "company[0][name]" id="comp_0" />

I have the following test case:

/** @test **/
public function add_new()
{
   $this->type('New Company' , 'company[0][name]');
}

I get the following error:

Symfony\Component\CssSelector\Exception\SyntaxErrorException: Expected identifier or "*", but <number at 20> found.

I am searching and trying alot ... but i am not able to get the solution for it.



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire