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_list_processes.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_list_processes.phpt')
-rw-r--r-- | ext/mysql/tests/mysql_list_processes.phpt | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/ext/mysql/tests/mysql_list_processes.phpt b/ext/mysql/tests/mysql_list_processes.phpt new file mode 100644 index 0000000..b0c71ad --- /dev/null +++ b/ext/mysql/tests/mysql_list_processes.phpt @@ -0,0 +1,52 @@ +--TEST-- +mysql_list_processes() +--SKIPIF-- +<?php +require_once('skipif.inc'); +require_once('skipifconnectfailure.inc'); +?> +--FILE-- +<?php +include "connect.inc"; + +$tmp = NULL; +$link = NULL; + +if (NULL !== ($tmp = @mysql_list_processes($link, $link))) + printf("[001] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp); + +require('table.inc'); + +if (!$res = mysql_list_processes($link)) + printf("[002] [%d] %s\n", mysql_errno($link), mysql_error($link)); + +if (!$num = mysql_num_rows($res)) + printf("[003] Empty process list? [%d] %s\n", mysql_errno($link), mysql_error($link)); + +$row = mysql_fetch_array($res, MYSQL_NUM); +if ((version_compare(PHP_VERSION, '5.9.9', '>') == 1) && !is_unicode($row[0])) { + printf("[004] Check for unicode support\n"); + var_inspect($row); +} + +mysql_free_result($res); + +if (!$res = mysql_list_processes()) + printf("[005] [%d] %s\n", mysql_errno(), mysql_error()); + +if (!$num = mysql_num_rows($res)) + printf("[006] Empty process list? [%d] %s\n", mysql_errno(), mysql_error()); + +$row = mysql_fetch_array($res, MYSQL_NUM); +if ((version_compare(PHP_VERSION, '5.9.9', '>') == 1) && !is_unicode($row[0])) { + printf("[007] Check for unicode support\n"); + var_inspect($row); +} + +mysql_free_result($res); +mysql_close($link); + +print "done!\n"; +?> +--EXPECTF-- +done!
\ No newline at end of file |