]> granicus.if.org Git - php/commitdiff
added test for gzgetss()
authormarcosptf <marcosptf@yahoo.com.br>
Thu, 20 Aug 2015 11:34:29 +0000 (08:34 -0300)
committerChristoph M. Becker <cmb@php.net>
Sun, 23 Aug 2015 15:55:23 +0000 (17:55 +0200)
ext/zlib/tests/gzgetss.gz [new file with mode: 0644]
ext/zlib/tests/gzgetss.phpt [new file with mode: 0644]
ext/zlib/tests/gzgetss.test [new file with mode: 0644]

diff --git a/ext/zlib/tests/gzgetss.gz b/ext/zlib/tests/gzgetss.gz
new file mode 100644 (file)
index 0000000..f6c9f5c
Binary files /dev/null and b/ext/zlib/tests/gzgetss.gz differ
diff --git a/ext/zlib/tests/gzgetss.phpt b/ext/zlib/tests/gzgetss.phpt
new file mode 100644 (file)
index 0000000..b0bdcb9
--- /dev/null
@@ -0,0 +1,22 @@
+--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/>
\ No newline at end of file
diff --git a/ext/zlib/tests/gzgetss.test b/ext/zlib/tests/gzgetss.test
new file mode 100644 (file)
index 0000000..37df485
--- /dev/null
@@ -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>
\ No newline at end of file