Skip to content

test to gzgetss function #1479

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 11 commits into from
Closed
Binary file added ext/zlib/tests/gzgetss.gz
Binary file not shown.
23 changes: 23 additions & 0 deletions ext/zlib/tests/gzgetss.phpt
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
--TEST--
gzgetss — Get line from gz-file pointer and strip HTML tags - function
--CREDITS--
marcosptf - <marcosptf@yahoo.com.br>
--SKIPIF--
<?php

<?php
if(!extension_loaded("zlib")){die("skip - ZLIB extension not loaded");}
?>
--FILE--
<?php
$handle = gzopen(__DIR__ . '/gzgetss.gz', 'r');

while (!gzeof($handle)){
$buffer = gzgetss($handle, 4096, "<code>");
print($buffer);

}
gzclose($handle);
?>
--EXPECT--
<code>stringgzgetss(resource $zp, int $length [, string $allowable_tags ]);<code/>
5 changes: 5 additions & 0 deletions ext/zlib/tests/gzgetss.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<div>
<p class="para rdfs-comment">
<code><span class="type">string</span><span class="methodname"><strong>gzgetss</strong></span>(resource $zp, int $length [, string $allowable_tags ]);<code/>
</p>
</div>