Annotation of embedaddon/php/ext/zlib/tests/gzfile_variation9.phpt, revision 1.1
1.1 ! misho 1: --TEST--
! 2: Test function gzfile() by substituting agument 2 with boolean values.
! 3: --SKIPIF--
! 4: <?php
! 5: if (!extension_loaded('zlib')) die ('skip zlib extension not available in this build');
! 6: ?>
! 7: --FILE--
! 8: <?php
! 9:
! 10:
! 11: $filename = dirname(__FILE__)."/004.txt.gz";
! 12:
! 13: $variation = array(
! 14: 'lowercase true' => true,
! 15: 'lowercase false' =>false,
! 16: 'uppercase TRUE' =>TRUE,
! 17: 'uppercase FALSE' =>FALSE,
! 18: );
! 19:
! 20:
! 21: foreach ( $variation as $var ) {
! 22: var_dump(gzfile( $filename, $var ) );
! 23: }
! 24: ?>
! 25: ===DONE===
! 26: --EXPECT--
! 27: array(6) {
! 28: [0]=>
! 29: string(36) "When you're taught through feelings
! 30: "
! 31: [1]=>
! 32: string(26) "Destiny flying high above
! 33: "
! 34: [2]=>
! 35: string(38) "all I know is that you can realize it
! 36: "
! 37: [3]=>
! 38: string(18) "Destiny who cares
! 39: "
! 40: [4]=>
! 41: string(19) "as it turns around
! 42: "
! 43: [5]=>
! 44: string(39) "and I know that it descends down on me
! 45: "
! 46: }
! 47: array(6) {
! 48: [0]=>
! 49: string(36) "When you're taught through feelings
! 50: "
! 51: [1]=>
! 52: string(26) "Destiny flying high above
! 53: "
! 54: [2]=>
! 55: string(38) "all I know is that you can realize it
! 56: "
! 57: [3]=>
! 58: string(18) "Destiny who cares
! 59: "
! 60: [4]=>
! 61: string(19) "as it turns around
! 62: "
! 63: [5]=>
! 64: string(39) "and I know that it descends down on me
! 65: "
! 66: }
! 67: array(6) {
! 68: [0]=>
! 69: string(36) "When you're taught through feelings
! 70: "
! 71: [1]=>
! 72: string(26) "Destiny flying high above
! 73: "
! 74: [2]=>
! 75: string(38) "all I know is that you can realize it
! 76: "
! 77: [3]=>
! 78: string(18) "Destiny who cares
! 79: "
! 80: [4]=>
! 81: string(19) "as it turns around
! 82: "
! 83: [5]=>
! 84: string(39) "and I know that it descends down on me
! 85: "
! 86: }
! 87: array(6) {
! 88: [0]=>
! 89: string(36) "When you're taught through feelings
! 90: "
! 91: [1]=>
! 92: string(26) "Destiny flying high above
! 93: "
! 94: [2]=>
! 95: string(38) "all I know is that you can realize it
! 96: "
! 97: [3]=>
! 98: string(18) "Destiny who cares
! 99: "
! 100: [4]=>
! 101: string(19) "as it turns around
! 102: "
! 103: [5]=>
! 104: string(39) "and I know that it descends down on me
! 105: "
! 106: }
! 107: ===DONE===
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>