Author: uwendel
Date: 2007-07-20 17:43:28 +0200 (Fri, 20 Jul 2007)
New Revision: 814
Modified:
trunk/tests/ext/mysqli/mysqli_store_result.phpt
trunk/tests/ext/mysqli/mysqli_thread_id.phpt
trunk/tests/ext/mysqli/mysqli_thread_safe.phpt
trunk/tests/ext/mysqli/mysqli_use_result.phpt
trunk/tests/ext/mysqli/mysqli_warning_count.phpt
Log:
Space2Tab for php.net
Modified: trunk/tests/ext/mysqli/mysqli_store_result.phpt
===================================================================
--- trunk/tests/ext/mysqli/mysqli_store_result.phpt 2007-07-20 15:38:09 UTC (rev 813)
+++ trunk/tests/ext/mysqli/mysqli_store_result.phpt 2007-07-20 15:43:28 UTC (rev 814)
@@ -5,52 +5,52 @@
<?php require_once('skipifemb.inc'); ?>
--FILE--
<?php
- include "connect.inc";
+ include "connect.inc";
- $tmp = NULL;
- $link = NULL;
-
- if (!is_null($tmp = @mysqli_store_result()))
- printf("[001] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
- if (!is_null($tmp = @mysqli_store_result($link)))
- printf("[002] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
+ $tmp = NULL;
+ $link = NULL;
- require('table.inc');
-
- if (!$res = mysqli_real_query($link, "SELECT id, label FROM test ORDER BY id"))
- printf("[003] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
-
- if (!is_object($res = mysqli_store_result($link)))
- printf("[004] Expecting object, got %s/%s. [%d] %s\n",
- gettype($res), $res, mysqli_errno($link), mysqli_error($link));
-
- if (true !== ($tmp = mysqli_data_seek($res, 2)))
- printf("[005] Expecting boolean/true, got %s/%s. [%d] %s\n",
- gettype($tmp), $tmp, mysqli_errno($link), mysqli_error($link));
+ if (!is_null($tmp = @mysqli_store_result()))
+ printf("[001] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
- mysqli_free_result($res);
-
- if (!mysqli_query($link, "DELETE FROM test"))
- printf("[006] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
-
- if (false !== ($res = mysqli_store_result($link)))
- printf("[007] Expecting boolean/false, got %s/%s. [%d] %s\n",
- gettype($res), $res, mysqli_errno($link), mysqli_error($link));
-
- if (!$res = mysqli_query($link, "SELECT id, label FROM test ORDER BY id"))
- printf("[008] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
-
- if (false !== ($tmp = mysqli_data_seek($res, 1)))
- printf("[009] Expecting boolean/false, got %s/%s\n",
- gettype($tmp), $tmp);
-
- mysqli_close($link);
-
- if (NULL !== ($tmp = mysqli_store_result($link)))
- printf("[010] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
- print "done!";
+ if (!is_null($tmp = @mysqli_store_result($link)))
+ printf("[002] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
+
+ require('table.inc');
+
+ if (!$res = mysqli_real_query($link, "SELECT id, label FROM test ORDER BY id"))
+ printf("[003] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
+
+ if (!is_object($res = mysqli_store_result($link)))
+ printf("[004] Expecting object, got %s/%s. [%d] %s\n",
+ gettype($res), $res, mysqli_errno($link), mysqli_error($link));
+
+ if (true !== ($tmp = mysqli_data_seek($res, 2)))
+ printf("[005] Expecting boolean/true, got %s/%s. [%d] %s\n",
+ gettype($tmp), $tmp, mysqli_errno($link), mysqli_error($link));
+
+ mysqli_free_result($res);
+
+ if (!mysqli_query($link, "DELETE FROM test"))
+ printf("[006] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
+
+ if (false !== ($res = mysqli_store_result($link)))
+ printf("[007] Expecting boolean/false, got %s/%s. [%d] %s\n",
+ gettype($res), $res, mysqli_errno($link), mysqli_error($link));
+
+ if (!$res = mysqli_query($link, "SELECT id, label FROM test ORDER BY id"))
+ printf("[008] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
+
+ if (false !== ($tmp = mysqli_data_seek($res, 1)))
+ printf("[009] Expecting boolean/false, got %s/%s\n",
+ gettype($tmp), $tmp);
+
+ mysqli_close($link);
+
+ if (NULL !== ($tmp = mysqli_store_result($link)))
+ printf("[010] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
+
+ print "done!";
?>
--EXPECTF--
Warning: mysqli_store_result(): Couldn't fetch mysqli in %s on line %d
Modified: trunk/tests/ext/mysqli/mysqli_thread_id.phpt
===================================================================
--- trunk/tests/ext/mysqli/mysqli_thread_id.phpt 2007-07-20 15:38:09 UTC (rev 813)
+++ trunk/tests/ext/mysqli/mysqli_thread_id.phpt 2007-07-20 15:43:28 UTC (rev 814)
@@ -5,32 +5,32 @@
<?php require_once('skipifemb.inc'); ?>
--FILE--
<?php
- include "connect.inc";
+ include "connect.inc";
- $tmp = NULL;
- $link = NULL;
-
- if (!is_null($tmp = @mysqli_thread_id()))
- printf("[001] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
- if (!is_null($tmp = @mysqli_thread_id($link)))
- printf("[002] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
+ $tmp = NULL;
+ $link = NULL;
- require('table.inc');
-
- if (!is_int($tmp = mysqli_thread_id($link)) || (0 === $tmp))
- printf("[003] Expecting int/any but zero, got %s/%s. [%d] %s\n",
- gettype($tmp), $tmp, mysqli_errno($link), mysqli_error($link));
-
- // should work if the thread id is correct
- mysqli_kill($link, mysqli_thread_id($link));
-
- mysqli_close($link);
-
- if (NULL !== ($tmp = mysqli_thread_id($link)))
- printf("[005] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
- print "done!";
+ if (!is_null($tmp = @mysqli_thread_id()))
+ printf("[001] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
+
+ if (!is_null($tmp = @mysqli_thread_id($link)))
+ printf("[002] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
+
+ require('table.inc');
+
+ if (!is_int($tmp = mysqli_thread_id($link)) || (0 === $tmp))
+ printf("[003] Expecting int/any but zero, got %s/%s. [%d] %s\n",
+ gettype($tmp), $tmp, mysqli_errno($link), mysqli_error($link));
+
+ // should work if the thread id is correct
+ mysqli_kill($link, mysqli_thread_id($link));
+
+ mysqli_close($link);
+
+ if (NULL !== ($tmp = mysqli_thread_id($link)))
+ printf("[005] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
+
+ print "done!";
?>
--EXPECTF--
Warning: mysqli_thread_id(): Couldn't fetch mysqli in %s on line %d
Modified: trunk/tests/ext/mysqli/mysqli_thread_safe.phpt
===================================================================
--- trunk/tests/ext/mysqli/mysqli_thread_safe.phpt 2007-07-20 15:38:09 UTC (rev 813)
+++ trunk/tests/ext/mysqli/mysqli_thread_safe.phpt 2007-07-20 15:43:28 UTC (rev 814)
@@ -5,10 +5,10 @@
<?php require_once('skipifemb.inc'); ?>
--FILE--
<?php
- if (!is_bool($tmp = mysqli_thread_safe()))
- printf("[001] Expecting boolean/any, got %s/%s.\n", gettype($tmp), $tmp);
-
- print "done!";
+ if (!is_bool($tmp = mysqli_thread_safe()))
+ printf("[001] Expecting boolean/any, got %s/%s.\n", gettype($tmp), $tmp);
+
+ print "done!";
?>
--EXPECTF--
done!
\ No newline at end of file
Modified: trunk/tests/ext/mysqli/mysqli_use_result.phpt
===================================================================
--- trunk/tests/ext/mysqli/mysqli_use_result.phpt 2007-07-20 15:38:09 UTC (rev 813)
+++ trunk/tests/ext/mysqli/mysqli_use_result.phpt 2007-07-20 15:43:28 UTC (rev 814)
@@ -5,55 +5,55 @@
<?php require_once('skipifemb.inc'); ?>
--FILE--
<?php
- include "connect.inc";
-
- $tmp = NULL;
- $link = NULL;
-
- if (!is_null($tmp = @mysqli_use_result()))
- printf("[001] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
- if (!is_null($tmp = @mysqli_use_result($link)))
- printf("[002] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
+ include "connect.inc";
- require('table.inc');
-
- if (!$res = mysqli_real_query($link, "SELECT id, label FROM test ORDER BY id"))
- printf("[003] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
-
- if (!is_object($res = mysqli_use_result($link)))
- printf("[004] Expecting object, got %s/%s. [%d] %s\n",
- gettype($res), $res, mysqli_errno($link), mysqli_error($link));
-
- if (false !== ($tmp = mysqli_data_seek($res, 2)))
- printf("[005] Expecting boolean/true, got %s/%s. [%d] %s\n",
- gettype($tmp), $tmp, mysqli_errno($link), mysqli_error($link));
+ $tmp = NULL;
+ $link = NULL;
- mysqli_free_result($res);
-
- if (!mysqli_query($link, "DELETE FROM test"))
- printf("[006] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
-
- if (false !== ($res = mysqli_use_result($link)))
- printf("[007] Expecting boolean/false, got %s/%s. [%d] %s\n",
- gettype($res), $res, mysqli_errno($link), mysqli_error($link));
-
- if (!$res = mysqli_query($link, "SELECT id, label FROM test ORDER BY id"))
- printf("[008] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
-
- if (false !== ($tmp = mysqli_data_seek($res, 1)))
- printf("[009] Expecting boolean/false, got %s/%s\n",
- gettype($tmp), $tmp);
-
- mysqli_close($link);
-
- if (NULL !== ($tmp = mysqli_use_result($link)))
- printf("[010] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
- print "done!";
+ if (!is_null($tmp = @mysqli_use_result()))
+ printf("[001] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
+
+ if (!is_null($tmp = @mysqli_use_result($link)))
+ printf("[002] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
+
+ require('table.inc');
+
+ if (!$res = mysqli_real_query($link, "SELECT id, label FROM test ORDER BY id"))
+ printf("[003] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
+
+ if (!is_object($res = mysqli_use_result($link)))
+ printf("[004] Expecting object, got %s/%s. [%d] %s\n",
+ gettype($res), $res, mysqli_errno($link), mysqli_error($link));
+
+ if (false !== ($tmp = mysqli_data_seek($res, 2)))
+ printf("[005] Expecting boolean/true, got %s/%s. [%d] %s\n",
+ gettype($tmp), $tmp, mysqli_errno($link), mysqli_error($link));
+
+ mysqli_free_result($res);
+
+ if (!mysqli_query($link, "DELETE FROM test"))
+ printf("[006] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
+
+ if (false !== ($res = mysqli_use_result($link)))
+ printf("[007] Expecting boolean/false, got %s/%s. [%d] %s\n",
+ gettype($res), $res, mysqli_errno($link), mysqli_error($link));
+
+ if (!$res = mysqli_query($link, "SELECT id, label FROM test ORDER BY id"))
+ printf("[008] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
+
+ if (false !== ($tmp = mysqli_data_seek($res, 1)))
+ printf("[009] Expecting boolean/false, got %s/%s\n",
+ gettype($tmp), $tmp);
+
+ mysqli_close($link);
+
+ if (NULL !== ($tmp = mysqli_use_result($link)))
+ printf("[010] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
+
+ print "done!";
?>
--EXPECTF--
Warning: mysqli_data_seek(): Function cannot be used with MYSQL_USE_RESULT in %s on line
%d
Warning: mysqli_use_result(): Couldn't fetch mysqli in %s on line %d
-done!
\ No newline at end of file
+done!
\ No newline at end of file
Modified: trunk/tests/ext/mysqli/mysqli_warning_count.phpt
===================================================================
--- trunk/tests/ext/mysqli/mysqli_warning_count.phpt 2007-07-20 15:38:09 UTC (rev 813)
+++ trunk/tests/ext/mysqli/mysqli_warning_count.phpt 2007-07-20 15:43:28 UTC (rev 814)
@@ -5,41 +5,41 @@
<?php require_once('skipifemb.inc'); ?>
--FILE--
<?php
- include "connect.inc";
-
- $tmp = NULL;
- $link = NULL;
-
- if (!is_null($tmp = @mysqli_warning_count()))
- printf("[001] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
- if (!is_null($tmp = @mysqli_warning_count($link)))
- printf("[002] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
+ include "connect.inc";
- require('table.inc');
-
- if (NULL !== ($tmp = @mysqli_warning_count($link, "too_many")))
- printf("[003] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
- if (!$res = mysqli_query($link, "SELECT id, label FROM test"))
- printf("[004] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
-
- if (0 !== ($tmp = mysqli_warning_count($link)))
- printf("[005] Expecting int/0, got %s/%s\n", gettype($tmp), $tmp);
-
- if (!mysqli_query($link, "DROP TABLE IF EXISTS this_table_does_not_exist"))
- printf("[006] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
-
- if (1 !== ($tmp = mysqli_warning_count($link)))
- printf("[007] Expecting int/1, got %s/%s\n", gettype($tmp), $tmp);
+ $tmp = NULL;
+ $link = NULL;
- mysqli_close($link);
-
- if (NULL !== ($tmp = mysqli_warning_count($link)))
- printf("[010] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
- print "done!";
+ if (!is_null($tmp = @mysqli_warning_count()))
+ printf("[001] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
+
+ if (!is_null($tmp = @mysqli_warning_count($link)))
+ printf("[002] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
+
+ require('table.inc');
+
+ if (NULL !== ($tmp = @mysqli_warning_count($link, "too_many")))
+ printf("[003] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
+
+ if (!$res = mysqli_query($link, "SELECT id, label FROM test"))
+ printf("[004] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
+
+ if (0 !== ($tmp = mysqli_warning_count($link)))
+ printf("[005] Expecting int/0, got %s/%s\n", gettype($tmp), $tmp);
+
+ if (!mysqli_query($link, "DROP TABLE IF EXISTS this_table_does_not_exist"))
+ printf("[006] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
+
+ if (1 !== ($tmp = mysqli_warning_count($link)))
+ printf("[007] Expecting int/1, got %s/%s\n", gettype($tmp), $tmp);
+
+ mysqli_close($link);
+
+ if (NULL !== ($tmp = mysqli_warning_count($link)))
+ printf("[010] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
+
+ print "done!";
?>
--EXPECTF--
Warning: mysqli_warning_count(): Couldn't fetch mysqli in %s on line %d
-done!
\ No newline at end of file
+done!
\ No newline at end of file
| Thread |
|---|
| • PHP mysqlnd svn commit: r814 - trunk/tests/ext/mysqli | uwendel | 20 Jul |