Does the attach method expect a CSS identifier as the second argument?
Sep 19, 2015
4
Level 1
Multi file upload testing with symfony dom crawler
I want to unit test my upload process where people can upload a file and add some album images. The attaching is files works great but i have some problems with the multiple file upload.
<input id="album" name="album[]" type="file" multiple accept="image/png,image/jpeg">
I can't manage to attach images to this field.
$this->attach($images, 'album[]');
Gives the error
Symfony\Component\CssSelector\Exception\SyntaxErrorException: Expected identifier or "*", but <delimiter "]" at 8> found.
So tried:
$this->attach($images[0], 'album[0]');
But that also doesn't work. Any ideas? I can't find any documentation on this subject.
Please or to participate in this conversation.