Annotation of embedaddon/php/ext/mysql/tests/mysql_get_proto_info.phpt, revision 1.1
1.1 ! misho 1: --TEST--
! 2: mysql_get_proto_info()
! 3: --SKIPIF--
! 4: <?php
! 5: require_once('skipif.inc');
! 6: require_once('skipifconnectfailure.inc');
! 7: ?>
! 8: --FILE--
! 9: <?php
! 10: include_once "connect.inc";
! 11:
! 12: if (NULL !== ($tmp = @mysql_get_proto_info(NULL)))
! 13: printf("[002] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
! 14:
! 15: require "table.inc";
! 16: if (!is_int($info = mysql_get_proto_info($link)) || (0 === $info))
! 17: printf("[003] Expecting int/any_non_empty, got %s/%s\n", gettype($info), $info);
! 18:
! 19: if (!is_int($info2 = mysql_get_proto_info()) || (0 === $info2))
! 20: printf("[004] Expecting int/any_non_empty, got %s/%s\n", gettype($info2), $info2);
! 21:
! 22: assert($info === $info2);
! 23:
! 24: if (NULL !== ($tmp = @mysql_get_proto_info('too many', 'arguments')))
! 25: printf("[005] Expecting NULL got %s/%s\n", gettype($tmp), $tmp);
! 26:
! 27: print "done!";
! 28: ?>
! 29: --CLEAN--
! 30: <?php
! 31: require_once("clean_table.inc");
! 32: ?>
! 33: --EXPECTF--
! 34: done!
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>