let DEV_2 be trunk
[m6w6/ext-http] / tests / envrequestbody003.phpt
1 --TEST--
2 env request body
3 --SKIPIF--
4 <? include "skipif.inc";
5 --PUT--
6 Content-Type: multipart/form-data;boundary=123
7 --123
8 Content-Disposition: form-data; name="foo"
9
10 bar
11 --123
12 Content-Disposition: form-data; name="baz"
13
14 buh
15 --123
16 Content-Disposition: form-data; name="up"; filename="up.txt"
17
18 foo=bar&baz=buh
19 --123--
20 --FILE--
21 <?
22 var_dump($_POST);
23 var_dump($_FILES);
24 ?>
25 DONE
26 --EXPECTF--
27 array(2) {
28 ["foo"]=>
29 string(3) "bar"
30 ["baz"]=>
31 string(3) "buh"
32 }
33 array(1) {
34 ["up"]=>
35 array(5) {
36 ["name"]=>
37 string(6) "up.txt"
38 ["type"]=>
39 string(0) ""
40 ["tmp_name"]=>
41 string(14) "%s"
42 ["error"]=>
43 int(0)
44 ["size"]=>
45 int(15)
46 }
47 }
48 DONE