X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=tests%2Fmessagebody004.phpt;fp=tests%2Fmessagebody004.phpt;h=64254d4e37d76239b9f8f90eb14a4903f7b06ab2;hb=beb3af0516cb26bcc6e9c77876b333dcec51c44f;hp=0000000000000000000000000000000000000000;hpb=1d87e15edcbcf4b16c5a1aa80ce69229eedb3468;p=m6w6%2Fext-http diff --git a/tests/messagebody004.phpt b/tests/messagebody004.phpt new file mode 100644 index 0000000..64254d4 --- /dev/null +++ b/tests/messagebody004.phpt @@ -0,0 +1,81 @@ +--TEST-- +message body add form +--SKIPIF-- + +--FILE-- +addForm( + array( + "foo" => "bar", + "more" => array( + "bah", "baz", "fuz" + ), + ), + array( + array( + "file" => __FILE__, + "name" => "upload", + "type" => "text/plain", + ) + ) +); + +echo $temp; + +?> +DONE +--EXPECTF-- +Test +--%x.%x +Content-Disposition: form-data; name="foo" + +bar +--%x.%x +Content-Disposition: form-data; name="more[0]" + +bah +--%x.%x +Content-Disposition: form-data; name="more[1]" + +baz +--%x.%x +Content-Disposition: form-data; name="more[2]" + +fuz +--%x.%x +Content-Disposition: form-data; name="upload"; filename="%s" +Content-Transfer-Encoding: binary +Content-Type: text/plain + +addForm( + array( + "foo" => "bar", + "more" => array( + "bah", "baz", "fuz" + ), + ), + array( + array( + "file" => __FILE__, + "name" => "upload", + "type" => "text/plain", + ) + ) +); + +echo $temp; + +?> +DONE + +--%x.%x-- +DONE