Annotation of embedaddon/php/ext/zlib/tests/gzfile_basic2.phpt, revision 1.1.1.2

1.1       misho       1: --TEST--
                      2: Test function gzfile() reading a plain relative file
                      3: --SKIPIF--
                      4: <?php
                      5: if (!extension_loaded('zlib')) die ('skip zlib extension not available in this build');
                      6: ?>
                      7: --FILE--
                      8: <?php
                      9: $plaintxt = b<<<EOT
                     10: hello world
                     11: is a very common test
                     12: for all languages
                     13: EOT;
                     14: $dirname = 'gzfile_temp';
                     15: $filename = $dirname.'/plainfile.txt';
                     16: mkdir($dirname);
                     17: $h = fopen($filename, 'w');
                     18: fwrite($h, $plaintxt);
                     19: fclose($h);
                     20: 
                     21: 
                     22: var_dump(gzfile( $filename ) );
                     23: 
                     24: unlink($filename);
                     25: rmdir($dirname);
                     26: ?>
                     27: ===DONE===
                     28: --EXPECT--
                     29: array(3) {
                     30:   [0]=>
                     31:   string(12) "hello world
                     32: "
                     33:   [1]=>
                     34:   string(22) "is a very common test
                     35: "
                     36:   [2]=>
                     37:   string(17) "for all languages"
                     38: }
1.1.1.2 ! misho      39: ===DONE===

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