lundi 7 mars 2016

How to attach multiple file in Laravel 5 Codeception

I would like to attach several files to run my test in Laravel 5.2 and Codeception 2.1.6.

I have an input :

<input type="file" id="shapefiles" name="shapefiles[]" multiple>

When I try to attach some files to it like this :

$I->attachFile('shapefiles[]', 'districts/shapefiles/admin2.dbf');
$I->attachFile('shapefiles[]', 'districts/shapefiles/admin2.shp');

I get the error :

[TestRuntimeException] None of form fields by shapefiles[] were not matched

I can't reproduce the behaviour I would like to test here. I didn't find any advice on my friend Google. How could I manage to do that ?



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire