unfold message body tests
[m6w6/ext-http] / tests / messagebody007.phpt
diff --git a/tests/messagebody007.phpt b/tests/messagebody007.phpt
new file mode 100644 (file)
index 0000000..dc010da
--- /dev/null
@@ -0,0 +1,21 @@
+--TEST--
+message body to stream
+--SKIPIF--
+<?php
+include "skipif.inc";
+?>
+--FILE--
+<?php
+echo "Test\n";
+
+$file = new http\Message\Body(fopen(__FILE__,"r"));
+$file->toStream($f = fopen("php://temp", "w")); 
+fseek($f, 0, SEEK_SET);
+var_dump(file_get_contents(__FILE__) === stream_get_contents($f));
+
+?>
+DONE
+--EXPECT--
+Test
+bool(true)
+DONE