summaryrefslogtreecommitdiff
path: root/ext/mysqli/tests/mysqli_get_connection_stats.phpt
diff options
context:
space:
mode:
Diffstat (limited to 'ext/mysqli/tests/mysqli_get_connection_stats.phpt')
-rw-r--r--ext/mysqli/tests/mysqli_get_connection_stats.phpt100
1 files changed, 50 insertions, 50 deletions
diff --git a/ext/mysqli/tests/mysqli_get_connection_stats.phpt b/ext/mysqli/tests/mysqli_get_connection_stats.phpt
index be2dd150e5..cd559afe21 100644
--- a/ext/mysqli/tests/mysqli_get_connection_stats.phpt
+++ b/ext/mysqli/tests/mysqli_get_connection_stats.phpt
@@ -14,70 +14,70 @@ if (!function_exists('mysqli_get_connection_stats')) {
?>
--FILE--
<?php
- $tmp = $link = null;
- if (!is_null($tmp = @mysqli_get_connection_stats()))
- printf("[001] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
+ $tmp = $link = null;
+ if (!is_null($tmp = @mysqli_get_connection_stats()))
+ printf("[001] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
- if (!is_null($tmp = @mysqli_get_connection_stats($link)))
- printf("[002] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
+ if (!is_null($tmp = @mysqli_get_connection_stats($link)))
+ printf("[002] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
- require("table.inc");
+ require("table.inc");
- if (!is_array($info = mysqli_get_connection_stats($link)) || empty($info))
- printf("[003] Expecting array/any_non_empty, got %s/%s\n", gettype($info), $info);
+ if (!is_array($info = mysqli_get_connection_stats($link)) || empty($info))
+ printf("[003] Expecting array/any_non_empty, got %s/%s\n", gettype($info), $info);
- if (!is_array($info2 = mysqli_get_client_stats()) || empty($info2))
- printf("[004] Expecting array/any_non_empty, got %s/%s\n", gettype($info2), $info2);
+ if (!is_array($info2 = mysqli_get_client_stats()) || empty($info2))
+ printf("[004] Expecting array/any_non_empty, got %s/%s\n", gettype($info2), $info2);
- foreach ($info as $k => &$v) {
- if (strpos($k, "mem_") === 0) {
- $v = 0;
- }
- }
- foreach ($info2 as $k => &$v) {
- if (strpos($k, "mem_") === 0) {
- $v = 0;
- }
- }
+ foreach ($info as $k => &$v) {
+ if (strpos($k, "mem_") === 0) {
+ $v = 0;
+ }
+ }
+ foreach ($info2 as $k => &$v) {
+ if (strpos($k, "mem_") === 0) {
+ $v = 0;
+ }
+ }
- if ($info !== $info2) {
- printf("[005] The hashes should be identical except of the memory related fields\n");
- var_dump($info);
- var_dump($info2);
- }
+ if ($info !== $info2) {
+ printf("[005] The hashes should be identical except of the memory related fields\n");
+ var_dump($info);
+ var_dump($info2);
+ }
- if (!is_array($info = $link->get_connection_stats()) || empty($info))
- printf("[006] Expecting array/any_non_empty, got %s/%s\n", gettype($info), $info);
+ if (!is_array($info = $link->get_connection_stats()) || empty($info))
+ printf("[006] Expecting array/any_non_empty, got %s/%s\n", gettype($info), $info);
- foreach ($info as $k => &$v) {
- if (strpos($k, "mem_") === 0) {
- $v = 0;
- }
- }
+ foreach ($info as $k => &$v) {
+ if (strpos($k, "mem_") === 0) {
+ $v = 0;
+ }
+ }
- if ($info !== $info2) {
- printf("[007] The hashes should be identical except of the memory related fields\n");
- var_dump($info);
- var_dump($info2);
- }
+ if ($info !== $info2) {
+ printf("[007] The hashes should be identical except of the memory related fields\n");
+ var_dump($info);
+ var_dump($info2);
+ }
- mysqli_close($link);
- require("table.inc");
+ mysqli_close($link);
+ require("table.inc");
- if (!is_array($info = mysqli_get_connection_stats($link)) || empty($info))
- printf("[008] Expecting array/any_non_empty, got %s/%s\n", gettype($info), $info);
+ if (!is_array($info = mysqli_get_connection_stats($link)) || empty($info))
+ printf("[008] Expecting array/any_non_empty, got %s/%s\n", gettype($info), $info);
- if (!is_array($info2 = mysqli_get_client_stats()) || empty($info2))
- printf("[009] Expecting array/any_non_empty, got %s/%s\n", gettype($info2), $info2);
+ if (!is_array($info2 = mysqli_get_client_stats()) || empty($info2))
+ printf("[009] Expecting array/any_non_empty, got %s/%s\n", gettype($info2), $info2);
- // assuming the test is run in a plain-vanilla CLI environment
- if ($info === $info2) {
- printf("[010] The hashes should not be identical\n");
- var_dump($info);
- var_dump($info2);
- }
+ // assuming the test is run in a plain-vanilla CLI environment
+ if ($info === $info2) {
+ printf("[010] The hashes should not be identical\n");
+ var_dump($info);
+ var_dump($info2);
+ }
- print "done!";
+ print "done!";
?>
--CLEAN--
<?php