Annotation of embedaddon/php/ext/bz2/tests/001.phpt, revision 1.1
1.1 ! misho 1: --TEST--
! 2: bzopen() and invalid parameters
! 3: --SKIPIF--
! 4: <?php if (!extension_loaded("bz2")) print "skip"; ?>
! 5: --FILE--
! 6: <?php
! 7:
! 8: var_dump(bzopen());
! 9: var_dump(bzopen("", ""));
! 10: var_dump(bzopen("", "r"));
! 11: var_dump(bzopen("", "w"));
! 12: var_dump(bzopen("", "x"));
! 13: var_dump(bzopen("", "rw"));
! 14: var_dump(bzopen("no_such_file", "r"));
! 15:
! 16: $fp = fopen(__FILE__,"r");
! 17: var_dump(bzopen($fp, "r"));
! 18:
! 19: echo "Done\n";
! 20: ?>
! 21: --EXPECTF--
! 22: Warning: bzopen() expects exactly 2 parameters, 0 given in %s on line %d
! 23: NULL
! 24:
! 25: Warning: bzopen(): '' is not a valid mode for bzopen(). Only 'w' and 'r' are supported. in %s on line %d
! 26: bool(false)
! 27:
! 28: Warning: bzopen(): filename cannot be empty in %s on line %d
! 29: bool(false)
! 30:
! 31: Warning: bzopen(): filename cannot be empty in %s on line %d
! 32: bool(false)
! 33:
! 34: Warning: bzopen(): 'x' is not a valid mode for bzopen(). Only 'w' and 'r' are supported. in %s on line %d
! 35: bool(false)
! 36:
! 37: Warning: bzopen(): 'rw' is not a valid mode for bzopen(). Only 'w' and 'r' are supported. in %s on line %d
! 38: bool(false)
! 39:
! 40: Warning: bzopen(no_such_file): failed to open stream: No such file or directory in %s on line %d
! 41: bool(false)
! 42: resource(%d) of type (stream)
! 43: Done
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>