diff options
author | Lorry Tar Creator <lorry-tar-importer@baserock.org> | 2013-03-14 05:42:27 +0000 |
---|---|---|
committer | <> | 2013-04-03 16:25:08 +0000 |
commit | c4dd7a1a684490673e25aaf4fabec5df138854c4 (patch) | |
tree | 4d57c44caae4480efff02b90b9be86f44bf25409 /ext/mysql/tests/mysql_get_client_info.phpt | |
download | php2-master.tar.gz |
Imported from /home/lorry/working-area/delta_php2/php-5.4.13.tar.bz2.HEADphp-5.4.13master
Diffstat (limited to 'ext/mysql/tests/mysql_get_client_info.phpt')
-rw-r--r-- | ext/mysql/tests/mysql_get_client_info.phpt | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/ext/mysql/tests/mysql_get_client_info.phpt b/ext/mysql/tests/mysql_get_client_info.phpt new file mode 100644 index 0000000..95de0ad --- /dev/null +++ b/ext/mysql/tests/mysql_get_client_info.phpt @@ -0,0 +1,23 @@ +--TEST-- +mysql_get_client_info() +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +include "connect.inc"; +if (!is_string($info = mysql_get_client_info()) || ('' === $info)) + printf("[001] Expecting string/any_non_empty, got %s/%s\n", gettype($info), $info); + +if ((version_compare(PHP_VERSION, '5.9.9', '>') == 1) && !is_unicode($info)) { + printf("[002] Expecting Unicode!\n"); + var_inspect($info); +} + +if (!is_null($tmp = @mysql_get_client_info("too many arguments"))) { + printf("[003] Expecting NULL/NULL got %s/%s\n", $tmp, gettype($tmp)); +} + +print "done!"; +?> +--EXPECTF-- +done!
\ No newline at end of file |