Test with file (will fail)
This commit is contained in:
parent
70d93d7e4f
commit
3dc5912886
BIN
tests/datasets/http/multipart-file.httpinput
Normal file
BIN
tests/datasets/http/multipart-file.httpinput
Normal file
Binary file not shown.
|
@ -64,6 +64,42 @@ class HTTPInputDataTest extends MockedTest
|
||||||
'files' => []
|
'files' => []
|
||||||
]
|
]
|
||||||
],
|
],
|
||||||
|
'multipart-file' => [
|
||||||
|
'contenttype' => 'multipart/form-data;boundary=6d4d5a40-651a-4468-a62e-5a6ca2bf350d;charset=utf8',
|
||||||
|
'input' => file_get_contents(__DIR__ . '/../../datasets/http/multipart.httpinput'),
|
||||||
|
'expected' => [
|
||||||
|
'variables' => [
|
||||||
|
'display_name' => 'Vorname Nachname',
|
||||||
|
'note' => 'About me',
|
||||||
|
'fields_attributes' => [
|
||||||
|
0 => [
|
||||||
|
'name' => 'variable 1',
|
||||||
|
'value' => 'value 1',
|
||||||
|
],
|
||||||
|
1 => [
|
||||||
|
'name' => 'variable 2',
|
||||||
|
'value' => 'value 2',
|
||||||
|
]
|
||||||
|
]
|
||||||
|
],
|
||||||
|
'files' => [
|
||||||
|
'avatar' => [
|
||||||
|
'name' => '8ZUCS34Y5XNH',
|
||||||
|
'type' => 'image/png',
|
||||||
|
'tmp_name' => '/tmp/phpf85nKJ',
|
||||||
|
'error' => 0,
|
||||||
|
'size' => 349330
|
||||||
|
],
|
||||||
|
'header' => [
|
||||||
|
'name' => 'V2B6Z1IICGPM',
|
||||||
|
'type' => 'image/png',
|
||||||
|
'tmp_name' => '/tmp/phpe3sqHT',
|
||||||
|
'error' => 0,
|
||||||
|
'size' => 1323635
|
||||||
|
]
|
||||||
|
]
|
||||||
|
]
|
||||||
|
],
|
||||||
'form-urlencoded' => [
|
'form-urlencoded' => [
|
||||||
'contenttype' => 'application/x-www-form-urlencoded;charset=utf8',
|
'contenttype' => 'application/x-www-form-urlencoded;charset=utf8',
|
||||||
'input' => file_get_contents(__DIR__ . '/../../datasets/http/form-urlencoded.httpinput'),
|
'input' => file_get_contents(__DIR__ . '/../../datasets/http/form-urlencoded.httpinput'),
|
||||||
|
|
Loading…
Reference in a new issue