Annotation of embedaddon/php/ext/zlib/tests/zlib_scheme_file_put_contents_basic.phpt, revision 1.1.1.1

1.1       misho       1: --TEST--
                      2: Test compress.zlib:// scheme with the file_get_contents
                      3: --SKIPIF--
                      4: <?php 
                      5: if (!extension_loaded("zlib")) {
                      6:        print "skip - ZLIB extension not loaded"; 
                      7: }       
                      8: ?>
                      9: --FILE--
                     10: <?php
                     11: $outputFileName = __FILE__.'tmp';
                     12: $outFile = "compress.zlib://$outputFileName";
                     13: $data = <<<EOT
                     14: Here is some plain
                     15: text to be read
                     16: and displayed.
                     17: EOT;
                     18: 
                     19: file_put_contents($outFile, $data);
                     20: $h = gzopen($outputFileName, 'r');
                     21: gzpassthru($h);
                     22: gzclose($h);
                     23: echo "\n";
                     24: unlink($outputFileName);
                     25: ?>
                     26: ===DONE===
                     27: --EXPECT--
                     28: Here is some plain
                     29: text to be read
                     30: and displayed.
                     31: ===DONE===

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>