summaryrefslogtreecommitdiff
path: root/ext/zlib/tests
diff options
context:
space:
mode:
authorStanislav Malyshev <stas@php.net>2012-01-01 23:51:21 (GMT)
committerStanislav Malyshev <stas@php.net>2012-01-01 23:51:21 (GMT)
commit80dd931d40ffc38a9b1e6f1c22d4ec1db50dd571 (patch)
tree0308b7fde3e556469a90c653ef6a5497e65b86b5 /ext/zlib/tests
parentd3f0eaee0211bb569ff38aff31e9ee80c0c8dc1f (diff)
downloadphp-80dd931d40ffc38a9b1e6f1c22d4ec1db50dd571.tar.gz
add test for ob_gzhandler
Diffstat (limited to 'ext/zlib/tests')
-rw-r--r--ext/zlib/tests/ob_gzhandler_legacy_002.phpt24
1 files changed, 24 insertions, 0 deletions
diff --git a/ext/zlib/tests/ob_gzhandler_legacy_002.phpt b/ext/zlib/tests/ob_gzhandler_legacy_002.phpt
new file mode 100644
index 0000000..dad2821
--- /dev/null
+++ b/ext/zlib/tests/ob_gzhandler_legacy_002.phpt
@@ -0,0 +1,24 @@
+--TEST--
+ob_gzhandler legacy
+--SKIPIF--
+<?php
+if (!extension_loaded("zlib")) die("skip need ext/zlib");
+if (false === stristr(PHP_SAPI, "cgi")) die("skip need sapi/cgi");
+?>
+--INI--
+zlib.output_compression=0
+--ENV--
+HTTP_ACCEPT_ENCODING=
+--POST--
+dummy=42
+--FILE--
+<?php
+if (false !== ob_gzhandler("", PHP_OUTPUT_HANDLER_START)) {
+ ini_set("zlib.output_compression", 0);
+ ob_start("ob_gzhandler");
+}
+echo "hi\n";
+?>
+--EXPECTF--
+hi
+--EXPECTHEADERS--