- add HttpDeflateStream and HttpInflateStream objects
[m6w6/ext-http] / tests / encoding_objects_001.phpt
diff --git a/tests/encoding_objects_001.phpt b/tests/encoding_objects_001.phpt
new file mode 100644 (file)
index 0000000..d9cf992
--- /dev/null
@@ -0,0 +1,24 @@
+--TEST--
+encoding stream objects
+--SKIPIF--
+<?php
+include 'skip.inc';
+checkver(5);
+skipif(!http_support(HTTP_SUPPORT_ENCODINGS), "need zlib");
+?>
+--FILE--
+<?php
+echo "-TEST\n";
+$d = new HttpDeflateStream;
+$i = new HttpInflateStream;
+echo $i->update($d->update("Hi "));
+echo $i->update($d->update("there!\n"));
+echo $i->update($d->finish());
+echo $i->finish();
+echo "Done\n";
+?>
+--EXPECTF--
+%sTEST
+Hi there!
+Done
+