0

我想附上几个文件来在 Laravel 5.2 和 Codeception 2.1.6 中运行我的测试。

我有一个输入:

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

当我尝试像这样附加一些文件时:

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

我得到错误:

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

我无法重现我想在这里测试的行为。我没有在我的朋友 Google 上找到任何建议。我怎么能做到这一点?

4

0 回答 0