Skip to content

Commit 43a4a83

Browse files
committed
Add a test case for zlib.deflate
Cf. <https://bugs.php.net/48725#1351085255>.
1 parent c8512b2 commit 43a4a83

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

ext/zlib/tests/bug48725_2.phpt

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
--TEST--
2+
Bug #48725 (Support for flushing in zlib stream)
3+
--SKIPIF--
4+
<?php
5+
if (!extension_loaded('zlib')) die('skip zlib extension not available');
6+
?>
7+
--FILE--
8+
<?php
9+
$stream = fopen('data://text/plain;base64,' . base64_encode('Foo bar baz'),
10+
'r');
11+
stream_filter_append($stream, 'zlib.deflate', STREAM_FILTER_READ);
12+
print bin2hex(stream_get_contents($stream));
13+
?>
14+
--EXPECT--
15+
72cbcf57484a2c02e22a00000000ffff0300

0 commit comments

Comments
 (0)