From 3d0d359cb3afaf1e09b6ac692f0cd69b63cada6d Mon Sep 17 00:00:00 2001 From: uckelman Date: Sun, 9 May 2010 16:18:09 +0000 Subject: Added tests. git-svn-id: https://vassalengine.svn.sourceforge.net/svnroot/vassalengine/site-src/trunk@6820 67b53d14-2c14-4ace-a08f-0dab2b34000c --- test/HTTP_POST_multipartTest.php | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'test') diff --git a/test/HTTP_POST_multipartTest.php b/test/HTTP_POST_multipartTest.php index 309eccb..b99c98b 100644 --- a/test/HTTP_POST_multipartTest.php +++ b/test/HTTP_POST_multipartTest.php @@ -61,6 +61,30 @@ class HTTP_POST_multipartTest extends PHPUnit_Framework_TestCase { ), "Content-Disposition: form-data; name=\"foo\"; filename=\"somename.txt\"\r\nContent-Type: text/plain; charset=\"utf-8\"\r\n\r\nblah blah blah\nblah blah blah\r\n", null + ), + array( + array( + 'name' => 'foo', + 'filename' => 'somename.png', + 'mimetype' => 'image/png', + 'charset' => null, + 'encoding' => 'binary', + 'data' => "blah blah blah\nblah blah blah" + ), + "Content-Disposition: form-data; name=\"foo\"; filename=\"somename.png\"\r\nContent-Type: image/png\r\n\r\nblah blah blah\nblah blah blah\r\n", + null + ) + array( + array( + 'name' => 'foo', + 'filename' => 'somename.png', + 'mimetype' => 'image/png', + 'charset' => null, + 'encoding' => 'base64', + 'data' => "blah blah blah\nblah blah blah" + ), + "Content-Disposition: form-data; name=\"foo\"; filename=\"somename.png\"\r\nContent-Type: image/png\r\n\r\nYmxhaCBibGFoIGJsYWgKYmxhaCBibGFoIGJsYWg=\r\n", + null ) ); } -- cgit v1.2.3