diff options
Diffstat (limited to 'ext/mysqli/tests/mysqli_stmt_reset.phpt')
-rw-r--r-- | ext/mysqli/tests/mysqli_stmt_reset.phpt | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/ext/mysqli/tests/mysqli_stmt_reset.phpt b/ext/mysqli/tests/mysqli_stmt_reset.phpt index 339b885b72..654f09c337 100644 --- a/ext/mysqli/tests/mysqli_stmt_reset.phpt +++ b/ext/mysqli/tests/mysqli_stmt_reset.phpt @@ -21,8 +21,11 @@ require_once('skipifconnectfailure.inc'); if (!$stmt = mysqli_stmt_init($link)) printf("[003] [%d] %s\n", mysqli_errno($link), mysqli_error($link)); - if (false !== ($tmp = mysqli_stmt_reset($stmt))) - printf("[004] Expecting false, got %s/%s\n", gettype($tmp), $tmp); + try { + mysqli_stmt_reset($stmt); + } catch (Error $exception) { + echo $exception->getMessage() . "\n"; + } if (true !== ($tmp = mysqli_stmt_prepare($stmt, 'SELECT id FROM test'))) printf("[005] Expecting boolean/true, got %s/%s, [%d] %s\n", @@ -84,8 +87,11 @@ require_once('skipifconnectfailure.inc'); mysqli_stmt_close($stmt); - if (false !== ($tmp = mysqli_stmt_reset($stmt))) - printf("[021] Expecting false, got %s/%s\n", gettype($tmp), $tmp); + try { + mysqli_stmt_reset($stmt); + } catch (Error $exception) { + echo $exception->getMessage() . "\n"; + } mysqli_close($link); print "done!"; @@ -94,10 +100,8 @@ require_once('skipifconnectfailure.inc'); <?php require_once("clean_table.inc"); ?> ---EXPECTF-- -Warning: mysqli_stmt_reset(): invalid object or resource mysqli_stmt - in %s on line %d +--EXPECT-- +mysqli_stmt object is not fully initialized int(1) - -Warning: mysqli_stmt_reset(): Couldn't fetch mysqli_stmt in %s on line %d +mysqli_stmt object is already closed done! |