Author: uwendel
Date: 2007-07-11 16:47:46 +0200 (Wed, 11 Jul 2007)
New Revision: 715
Modified:
trunk/tests/ext/mysql/mysql_field_type.phpt
trunk/tests/ext/mysql/mysql_free_result.phpt
trunk/tests/ext/mysql/mysql_get_client_info.phpt
Log:
Whitespace only for php.net
Modified: trunk/tests/ext/mysql/mysql_field_type.phpt
===================================================================
--- trunk/tests/ext/mysql/mysql_field_type.phpt 2007-07-11 14:34:06 UTC (rev 714)
+++ trunk/tests/ext/mysql/mysql_field_type.phpt 2007-07-11 14:47:46 UTC (rev 715)
@@ -4,39 +4,39 @@
<?php require_once('skipif.inc'); ?>
--FILE--
<?php
- include "connect.inc";
+include "connect.inc";
- $tmp = NULL;
- $link = NULL;
-
- if (!is_null($tmp = @mysql_field_type()))
- printf("[001] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
- if (null !== ($tmp = @mysql_field_type($link)))
- printf("[002] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
+$tmp = NULL;
+$link = NULL;
- require('table.inc');
- if (!$res = mysql_query("SELECT id, label FROM test ORDER BY id LIMIT 2", $link)) {
- printf("[003] [%d] %s\n", mysql_errno($link), mysql_error($link));
- }
+if (!is_null($tmp = @mysql_field_type()))
+ printf("[001] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
- if (NULL !== ($tmp = mysql_field_type($res)))
- printf("[004] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
- if (false !== ($tmp = mysql_field_type($res, -1)))
- printf("[005] Expecting boolean/false, got %s/%s\n", gettype($tmp), $tmp);
-
- var_dump(mysql_field_type($res, 0));
-
- if (false !== ($tmp = mysql_field_type($res, 2)))
- printf("[008] Expecting boolean/false, got %s/%s\n", gettype($tmp), $tmp);
-
- mysql_free_result($res);
-
- var_dump(mysql_field_type($res, 0));
-
- mysql_close($link);
- print "done!";
+if (null !== ($tmp = @mysql_field_type($link)))
+ printf("[002] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
+
+require('table.inc');
+if (!$res = mysql_query("SELECT id, label FROM test ORDER BY id LIMIT 2", $link)) {
+ printf("[003] [%d] %s\n", mysql_errno($link), mysql_error($link));
+}
+
+if (NULL !== ($tmp = mysql_field_type($res)))
+ printf("[004] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
+
+if (false !== ($tmp = mysql_field_type($res, -1)))
+ printf("[005] Expecting boolean/false, got %s/%s\n", gettype($tmp), $tmp);
+
+var_dump(mysql_field_type($res, 0));
+
+if (false !== ($tmp = mysql_field_type($res, 2)))
+ printf("[008] Expecting boolean/false, got %s/%s\n", gettype($tmp), $tmp);
+
+mysql_free_result($res);
+
+var_dump(mysql_field_type($res, 0));
+
+mysql_close($link);
+print "done!";
?>
--EXPECTF--
Warning: Wrong parameter count for mysql_field_type() in %s on line %d
Modified: trunk/tests/ext/mysql/mysql_free_result.phpt
===================================================================
--- trunk/tests/ext/mysql/mysql_free_result.phpt 2007-07-11 14:34:06 UTC (rev 714)
+++ trunk/tests/ext/mysql/mysql_free_result.phpt 2007-07-11 14:47:46 UTC (rev 715)
@@ -4,37 +4,37 @@
<?php require_once('skipif.inc'); ?>
--FILE--
<?php
- include "connect.inc";
+include "connect.inc";
- $tmp = NULL;
- $link = NULL;
-
- if (!is_null($tmp = @mysql_free_result()))
- printf("[001] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
- if (false !== ($tmp = @mysql_free_result($link)))
- printf("[002] Expecting boolean/false, got %s/%s\n", gettype($tmp), $tmp);
+$tmp = NULL;
+$link = NULL;
- require('table.inc');
- if (!$res = mysql_query("SELECT id FROM test ORDER BY id LIMIT 1", $link)) {
- printf("[003] [%d] %s\n", mysql_errno($link), mysql_error($link));
- }
-
- var_dump(mysql_free_result($res));
- var_dump(mysql_free_result($res));
-
- if ($tmp = sys_get_temp_dir()) {
- $tmpname = tempnam($tmp, 'free_result');
- if ($fp = fopen($tmpname, 'w')) {
- if (false !== ($tmp = @mysql_free_result($fp)))
- printf("[004] Expecting boolean/false got %s/%s\n", gettype($tmp), $tmp);
- fclose($fp);
- @unlink($tmpname);
- }
- }
-
- mysql_close($link);
- print "done!";
+if (!is_null($tmp = @mysql_free_result()))
+ printf("[001] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
+
+if (false !== ($tmp = @mysql_free_result($link)))
+ printf("[002] Expecting boolean/false, got %s/%s\n", gettype($tmp), $tmp);
+
+require('table.inc');
+if (!$res = mysql_query("SELECT id FROM test ORDER BY id LIMIT 1", $link)) {
+ printf("[003] [%d] %s\n", mysql_errno($link), mysql_error($link));
+}
+
+var_dump(mysql_free_result($res));
+var_dump(mysql_free_result($res));
+
+if ($tmp = sys_get_temp_dir()) {
+ $tmpname = tempnam($tmp, 'free_result');
+ if ($fp = fopen($tmpname, 'w')) {
+ if (false !== ($tmp = @mysql_free_result($fp)))
+ printf("[004] Expecting boolean/false got %s/%s\n", gettype($tmp), $tmp);
+ fclose($fp);
+ @unlink($tmpname);
+ }
+}
+
+mysql_close($link);
+print "done!";
?>
--EXPECTF--
bool(true)
Modified: trunk/tests/ext/mysql/mysql_get_client_info.phpt
===================================================================
--- trunk/tests/ext/mysql/mysql_get_client_info.phpt 2007-07-11 14:34:06 UTC (rev 714)
+++ trunk/tests/ext/mysql/mysql_get_client_info.phpt 2007-07-11 14:47:46 UTC (rev 715)
@@ -4,20 +4,20 @@
<?php require_once('skipif.inc'); ?>
--FILE--
<?php
- include "connect.inc";
- if (!is_string($info = mysql_get_client_info()) || ('' === $info))
- printf("[001] Expecting string/any_non_empty, got %s/%s\n", gettype($info),
$info);
-
- if (ini_get('unicode.semantics') && !is_unicode($info)) {
- printf("[002] Expecting Unicode!\n");
- var_inspect($info);
- }
-
- if (!is_null($tmp = @mysql_get_client_info("too many arguments"))) {
- printf("[003] Expecting NULL/NULL got %s/%s\n", $tmp, gettype($tmp));
- }
+include "connect.inc";
+if (!is_string($info = mysql_get_client_info()) || ('' === $info))
+ printf("[001] Expecting string/any_non_empty, got %s/%s\n", gettype($info), $info);
- print "done!";
+if (ini_get('unicode.semantics') && !is_unicode($info)) {
+ printf("[002] Expecting Unicode!\n");
+ var_inspect($info);
+}
+
+if (!is_null($tmp = @mysql_get_client_info("too many arguments"))) {
+ printf("[003] Expecting NULL/NULL got %s/%s\n", $tmp, gettype($tmp));
+}
+
+print "done!";
?>
--EXPECTF--
done!
\ No newline at end of file
| Thread |
|---|
| • PHP mysqlnd svn commit: r715 - trunk/tests/ext/mysql | uwendel | 11 Jul |