From: Johannes Schlüter Date: Thu, 22 Jan 2009 21:56:46 +0000 (+0000) Subject: Fix tests X-Git-Tag: php-5.4.0alpha1~191^2~4420 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=00fc56bd9259a5288f2bc36437334c90a2e6c319;p=php Fix tests --- diff --git a/ext/mysqli/tests/mysqli_class_mysqli_interface.phpt b/ext/mysqli/tests/mysqli_class_mysqli_interface.phpt index f2b33c3633..6fb3e4ce8a 100644 --- a/ext/mysqli/tests/mysqli_class_mysqli_interface.phpt +++ b/ext/mysqli/tests/mysqli_class_mysqli_interface.phpt @@ -45,6 +45,7 @@ require_once('skipifconnectfailure.inc'); 'real_connect' => true, 'real_escape_string' => true, 'real_query' => true, + 'refresh' => true, 'rollback' => true, 'select_db' => true, 'set_charset' => true, diff --git a/ext/mysqli/tests/mysqli_constants.phpt b/ext/mysqli/tests/mysqli_constants.phpt index 471381ef6d..883be59593 100644 --- a/ext/mysqli/tests/mysqli_constants.phpt +++ b/ext/mysqli/tests/mysqli_constants.phpt @@ -84,6 +84,14 @@ require_once('skipifconnectfailure.inc'); "MYSQLI_REPORT_ERROR" => true, "MYSQLI_REPORT_OFF" => true, "MYSQLI_SET_CHARSET_NAME" => true, + "MYSQLI_REFRESH_GRANT" => true, + "MYSQLI_REFRESH_LOG" => true, + "MYSQLI_REFRESH_TABLES" => true, + "MYSQLI_REFRESH_HOSTS" => true, + "MYSQLI_REFRESH_STATUS" => true, + "MYSQLI_REFRESH_THREADS" => true, + "MYSQLI_REFRESH_SLAVE" => true, + "MYSQLI_REFRESH_MASTER" => true, ); /* depends on the build - experimental */ @@ -91,6 +99,10 @@ require_once('skipifconnectfailure.inc'); $expected_constants['MYSQLI_OPT_INT_AND_FLOAT_NATIVE'] = true; } + if ($IS_MYSQLND || defined('MYSQLI_REFRESH_BACKUP_LOG')) { + $expected_constants['MYSQLI_REFRESH_BACKUP_LOG'] = true; + } + if ($IS_MYSQLND) { $version = 50007 + 1; $expected_constants['MYSQLI_OPT_NET_CMD_BUFFER_SIZE'] = true; diff --git a/ext/mysqli/tests/mysqli_poll.phpt b/ext/mysqli/tests/mysqli_poll.phpt index fc0980544f..1bfae4bdbe 100644 --- a/ext/mysqli/tests/mysqli_poll.phpt +++ b/ext/mysqli/tests/mysqli_poll.phpt @@ -28,28 +28,28 @@ if (!$IS_MYSQLND) if (NULL !== ($tmp = @mysqli_poll())) printf("[002] Expecting NULL got %s\n", var_export($tmp, true)); - if (NULL !== ($tmp = @mysqli_poll(array($link)))) + $l = array($link); + if (NULL !== ($tmp = @mysqli_poll($l))) printf("[003] Expecting NULL got %s\n", var_export($tmp, true)); - if (NULL !== ($tmp = @mysqli_poll(array($link), NULL))) + $l = array($link); $n = NULL; + if (NULL !== ($tmp = @mysqli_poll($l, $n))) printf("[004] Expecting NULL got %s\n", var_export($tmp, true)); - if (NULL !== ($tmp = @mysqli_poll(array($link), NULL, NULL))) + $l = array($link); $n = NULL; + if (NULL !== ($tmp = @mysqli_poll($l, $n, $n))) printf("[005] Expecting NULL got %s\n", var_export($tmp, true)); - $int_val = 43; - $myerrors = &$int_val; - - if (NULL !== ($tmp = @mysqli_poll(array($link), $myerrors, NULL, 1))) - printf("[006] Expecting NULL got %s\n", var_export($tmp, true)); - - if (NULL !== ($tmp = @mysqli_poll(array($link), NULL, NULL, -1))) + $l = array($link); $e = NULL; $r = NULL; + if (NULL !== ($tmp = @mysqli_poll($l, $e, $r, -1))) printf("[007] Expecting boolean/false got %s/%s\n", gettype($tmp), var_export($tmp, true)); - if (NULL !== ($tmp = @mysqli_poll(array($link), NULL, NULL, 0, -1))) + $l = array($link); $e = NULL; $r = NULL; + if (NULL !== ($tmp = @mysqli_poll($l, $e, $r, 0, -1))) printf("[008] Expecting boolean/false got %s/%s\n", gettype($tmp), var_export($tmp, true)); - if (0 !== ($tmp = (mysqli_poll(array($link), array($link), array($link), 0, 1)))) + $read = $error = $reject = array($link); + if (0 !== ($tmp = (mysqli_poll($read, $error, $reject, 0, 1)))) printf("[009] Expecting int/0 got %s/%s\n", gettype($tmp), var_export($tmp, true));