X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fext-http;a=blobdiff_plain;f=tests%2Fmessagebody004.phpt;fp=tests%2Fmessagebody004.phpt;h=64254d4e37d76239b9f8f90eb14a4903f7b06ab2;hp=0000000000000000000000000000000000000000;hb=5b46115fea57ad7d842f9c713ca854da24d842cd;hpb=805287392b6266d05533043509367d7e411e595c 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