summaryrefslogtreecommitdiff
path: root/ext/zlib/tests/zlib_scheme_file_put_contents_basic.phpt
diff options
context:
space:
mode:
Diffstat (limited to 'ext/zlib/tests/zlib_scheme_file_put_contents_basic.phpt')
-rw-r--r--ext/zlib/tests/zlib_scheme_file_put_contents_basic.phpt31
1 files changed, 31 insertions, 0 deletions
diff --git a/ext/zlib/tests/zlib_scheme_file_put_contents_basic.phpt b/ext/zlib/tests/zlib_scheme_file_put_contents_basic.phpt
new file mode 100644
index 0000000..8ea41df
--- /dev/null
+++ b/ext/zlib/tests/zlib_scheme_file_put_contents_basic.phpt
@@ -0,0 +1,31 @@
+--TEST--
+Test compress.zlib:// scheme with the file_get_contents
+--SKIPIF--
+<?php
+if (!extension_loaded("zlib")) {
+ print "skip - ZLIB extension not loaded";
+}
+?>
+--FILE--
+<?php
+$outputFileName = __FILE__.'tmp';
+$outFile = "compress.zlib://$outputFileName";
+$data = <<<EOT
+Here is some plain
+text to be read
+and displayed.
+EOT;
+
+file_put_contents($outFile, $data);
+$h = gzopen($outputFileName, 'r');
+gzpassthru($h);
+gzclose($h);
+echo "\n";
+unlink($outputFileName);
+?>
+===DONE===
+--EXPECT--
+Here is some plain
+text to be read
+and displayed.
+===DONE=== \ No newline at end of file