unfold message body tests
[m6w6/ext-http] / tests / messagebody005.phpt
diff --git a/tests/messagebody005.phpt b/tests/messagebody005.phpt
new file mode 100644 (file)
index 0000000..2d1d8b2
--- /dev/null
@@ -0,0 +1,26 @@
+--TEST--
+message body add part
+--SKIPIF--
+<?php
+include "skipif.inc";
+?>
+--FILE--
+<?php
+echo "Test\n";
+
+$temp = new http\Message\Body;
+$temp->addPart(new http\Message("This: is a header\n\nand this is the data\n"));
+echo $temp;
+
+?>
+DONE
+--EXPECTF--
+Test
+--%x.%x
+This: is a header
+Content-Length: 21
+
+and this is the data
+
+--%x.%x--
+DONE