unfold message body tests
[m6w6/ext-http] / tests / messagebody010.phpt
diff --git a/tests/messagebody010.phpt b/tests/messagebody010.phpt
new file mode 100644 (file)
index 0000000..b50898d
--- /dev/null
@@ -0,0 +1,23 @@
+--TEST--
+message body resource
+--SKIPIF--
+<?php
+include "skipif.inc";
+?>
+--FILE--
+<?php
+echo "Test\n";
+
+$file = new http\Message\Body(fopen(__FILE__,"r"));
+for($i=0;$i<10;++$i) $stream = $file->getResource();
+var_dump(is_resource($stream));
+$stat = fstat($stream);
+var_dump(filesize(__FILE__) === $stat["size"]);
+
+?>
+DONE
+--EXPECT--
+Test
+bool(true)
+bool(true)
+DONE