Annotation of embedaddon/php/ext/dba/tests/dba_split.phpt, revision 1.1
1.1 ! misho 1: --TEST--
! 2: DBA Split Test
! 3: --SKIPIF--
! 4: <?php
! 5: require_once dirname(__FILE__) .'/skipif.inc';
! 6: die("info $HND handler used");
! 7: ?>
! 8: --FILE--
! 9: <?php
! 10: var_dump(dba_key_split("key1", "name"));
! 11: var_dump(dba_key_split(1));
! 12: var_dump(dba_key_split(null));
! 13: var_dump(dba_key_split(""));
! 14: var_dump(dba_key_split("name1"));
! 15: var_dump(dba_key_split("[key1"));
! 16: var_dump(dba_key_split("[key1]"));
! 17: var_dump(dba_key_split("key1]"));
! 18: var_dump(dba_key_split("[key1]name1"));
! 19: var_dump(dba_key_split("[key1]name1[key2]name2"));
! 20: var_dump(dba_key_split("[key1]name1"));
! 21:
! 22: ?>
! 23: ===DONE===
! 24: <?php exit(0); ?>
! 25: --EXPECTF--
! 26: Warning: Wrong parameter count for dba_key_split() in %sdba_split.php on line %d
! 27: NULL
! 28: array(2) {
! 29: [0]=>
! 30: string(0) ""
! 31: [1]=>
! 32: string(1) "1"
! 33: }
! 34: bool(false)
! 35: array(2) {
! 36: [0]=>
! 37: string(0) ""
! 38: [1]=>
! 39: string(0) ""
! 40: }
! 41: array(2) {
! 42: [0]=>
! 43: string(0) ""
! 44: [1]=>
! 45: string(5) "name1"
! 46: }
! 47: array(2) {
! 48: [0]=>
! 49: string(0) ""
! 50: [1]=>
! 51: string(5) "[key1"
! 52: }
! 53: array(2) {
! 54: [0]=>
! 55: string(4) "key1"
! 56: [1]=>
! 57: string(0) ""
! 58: }
! 59: array(2) {
! 60: [0]=>
! 61: string(0) ""
! 62: [1]=>
! 63: string(5) "key1]"
! 64: }
! 65: array(2) {
! 66: [0]=>
! 67: string(4) "key1"
! 68: [1]=>
! 69: string(5) "name1"
! 70: }
! 71: array(2) {
! 72: [0]=>
! 73: string(4) "key1"
! 74: [1]=>
! 75: string(16) "name1[key2]name2"
! 76: }
! 77: array(2) {
! 78: [0]=>
! 79: string(4) "key1"
! 80: [1]=>
! 81: string(5) "name1"
! 82: }
! 83: ===DONE===
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>