Skip to content

Commit 0e4b9ff

Browse files
committed
Add test case for bug #77080
1 parent 14145d5 commit 0e4b9ff

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
--TEST--
2+
Bug #77080 (Deflate not working)
3+
--SKIPIF--
4+
<?php
5+
if (!extension_loaded('zlib')) die('skip zlib extension not available');
6+
?>
7+
--FILE--
8+
<?php
9+
$string = str_repeat("0123456789", 100);
10+
$stream = fopen('data://text/plain,' . $string,'r');
11+
stream_filter_append($stream, 'zlib.deflate', STREAM_FILTER_READ, 6);
12+
$compressed = stream_get_contents($stream);
13+
var_dump(gzinflate($compressed) === $string);
14+
?>
15+
--EXPECT--
16+
bool(true)

0 commit comments

Comments
 (0)