Author: uwendel
Date: 2007-07-20 17:53:33 +0200 (Fri, 20 Jul 2007)
New Revision: 815
Modified:
trunk/tests/ext/mysqli/001.phpt
trunk/tests/ext/mysqli/002.phpt
trunk/tests/ext/mysqli/020.phpt
trunk/tests/ext/mysqli/023.phpt
trunk/tests/ext/mysqli/024.phpt
trunk/tests/ext/mysqli/025.phpt
trunk/tests/ext/mysqli/042.phpt
trunk/tests/ext/mysqli/048.phpt
trunk/tests/ext/mysqli/060.phpt
trunk/tests/ext/mysqli/065.phpt
trunk/tests/ext/mysqli/bug33491.phpt
trunk/tests/ext/mysqli/bug38003.phpt
Log:
Space2Tab for php.net
Modified: trunk/tests/ext/mysqli/001.phpt
===================================================================
--- trunk/tests/ext/mysqli/001.phpt 2007-07-20 15:43:28 UTC (rev 814)
+++ trunk/tests/ext/mysqli/001.phpt 2007-07-20 15:53:33 UTC (rev 815)
@@ -34,13 +34,13 @@
/* temporary addition for Kent's setup, Win32 box */
for ($i = 0; $i < 10; $i++) {
- if (!$link = mysqli_init())
- printf("[001 + %d] mysqli_init() failed, [%d] %s\n", $i, mysqli_connect_errno(),
mysqli_connect_error());
+ if (!$link = mysqli_init())
+ printf("[001 + %d] mysqli_init() failed, [%d] %s\n", $i, mysqli_connect_errno(),
mysqli_connect_error());
- if (!mysqli_real_connect($link, $host, $user, $passwd, $db, $port, $socket))
- printf("[002 + %d] mysqli_real_connect() failed, [%d] %s\n", $i,
mysqli_connect_errno(), mysqli_connect_error());
+ if (!mysqli_real_connect($link, $host, $user, $passwd, $db, $port, $socket))
+ printf("[002 + %d] mysqli_real_connect() failed, [%d] %s\n", $i,
mysqli_connect_errno(), mysqli_connect_error());
- mysqli_close($link);
+ mysqli_close($link);
}
/*** test mysqli_real_connect compressed ***/
Modified: trunk/tests/ext/mysqli/002.phpt
===================================================================
--- trunk/tests/ext/mysqli/002.phpt 2007-07-20 15:43:28 UTC (rev 814)
+++ trunk/tests/ext/mysqli/002.phpt 2007-07-20 15:53:33 UTC (rev 815)
@@ -1,35 +1,35 @@
--TEST--
-mysqli bind_result 1
+mysqli bind_result 1
--SKIPIF--
<?php require_once('skipif.inc'); ?>
--FILE--
<?php
include "connect.inc";
-
+
/*** test mysqli_connect 127.0.0.1 ***/
if (!$link = mysqli_connect($host, $user, $passwd, $db, $port, $socket))
- printf("[001] [%d] %s\n", mysqli_connect_errno(), mysqli_connect_error());
+ printf("[001] [%d] %s\n", mysqli_connect_errno(), mysqli_connect_error());
if (!mysqli_query($link, "DROP TABLE IF EXISTS test_fetch_null"))
printf("[002] Cannot drop table, [%d] %s\n", mysqli_errno($link), mysqli_error($link));
$rc = mysqli_query($link,"CREATE TABLE test_fetch_null(col1 tinyint, col2 smallint,
- col3 int, col4 bigint,
- col5 float, col6 double,
- col7 date, col8 time,
- col9 varbinary(10),
- col10 varchar(50),
- col11 char(20)) ENGINE=" . $engine);
+ col3 int, col4 bigint,
+ col5 float, col6 double,
+ col7 date, col8 time,
+ col9 varbinary(10),
+ col10 varchar(50),
+ col11 char(20)) ENGINE=" . $engine);
if (!$rc)
printf("[003] Cannot create table, [%d] %s\n", mysqli_errno($link),
mysqli_error($link));
-
+
$rc = mysqli_query($link, "INSERT INTO test_fetch_null(col1,col10, col11)
VALUES(1,'foo1', 1000),(2,'foo2', 88),(3,'foo3', 389789)");
if (!$rc)
printf("[004] Cannot insert records, [%d] %s\n", mysqli_errno($link),
mysqli_error($link));
$stmt = mysqli_prepare($link, "SELECT col1, col2, col3, col4, col5, col6, col7, col8,
col9, col10, col11 from test_fetch_null ORDER BY col1");
- mysqli_bind_result($stmt, $c1, $c2, $c3, $c4, $c5, $c6, $c7, $c8, $c9, $c10, $c11);
+ mysqli_bind_result($stmt, $c1, $c2, $c3, $c4, $c5, $c6, $c7, $c8, $c9, $c10, $c11);
mysqli_execute($stmt);
mysqli_fetch($stmt);
Modified: trunk/tests/ext/mysqli/020.phpt
===================================================================
--- trunk/tests/ext/mysqli/020.phpt 2007-07-20 15:43:28 UTC (rev 814)
+++ trunk/tests/ext/mysqli/020.phpt 2007-07-20 15:53:33 UTC (rev 815)
@@ -18,11 +18,11 @@
mysqli_query($link,"DROP TABLE IF EXISTS test_bind_result");
mysqli_query($link,"CREATE TABLE test_bind_result(c1 date, c2 time,
- c3 timestamp(14),
- c4 year,
- c5 datetime,
- c6 timestamp(4),
- c7 timestamp(6))");
+ c3 timestamp(14),
+ c4 year,
+ c5 datetime,
+ c6 timestamp(4),
+ c7 timestamp(6))");
$stmt = mysqli_prepare($link, "INSERT INTO test_bind_result VALUES (?,?,?,?,?,?,?)");
mysqli_bind_param($stmt, "sssssss", $d1, $d2, $d3, $d4, $d5, $d6, $d7);
Modified: trunk/tests/ext/mysqli/023.phpt
===================================================================
--- trunk/tests/ext/mysqli/023.phpt 2007-07-20 15:43:28 UTC (rev 814)
+++ trunk/tests/ext/mysqli/023.phpt 2007-07-20 15:53:33 UTC (rev 815)
@@ -14,12 +14,12 @@
mysqli_query($link,"DROP TABLE IF EXISTS test_bind_fetch");
mysqli_query($link,"CREATE TABLE test_bind_fetch(c1 int unsigned,
- c2 int unsigned,
- c3 int,
- c4 int,
- c5 int,
- c6 int unsigned,
- c7 int)");
+ c2 int unsigned,
+ c3 int,
+ c4 int,
+ c5 int,
+ c6 int unsigned,
+ c7 int)");
$stmt = mysqli_prepare($link, "INSERT INTO test_bind_fetch VALUES (?,?,?,?,?,?,?)");
mysqli_bind_param($stmt, "iiiiiii", $c1,$c2,$c3,$c4,$c5,$c6,$c7);
Modified: trunk/tests/ext/mysqli/024.phpt
===================================================================
--- trunk/tests/ext/mysqli/024.phpt 2007-07-20 15:43:28 UTC (rev 814)
+++ trunk/tests/ext/mysqli/024.phpt 2007-07-20 15:53:33 UTC (rev 815)
@@ -14,12 +14,12 @@
mysqli_query($link,"DROP TABLE IF EXISTS test_bind_fetch");
mysqli_query($link,"CREATE TABLE test_bind_fetch(c1 smallint unsigned,
- c2 smallint unsigned,
- c3 smallint,
- c4 smallint,
- c5 smallint,
- c6 smallint unsigned,
- c7 smallint)");
+ c2 smallint unsigned,
+ c3 smallint,
+ c4 smallint,
+ c5 smallint,
+ c6 smallint unsigned,
+ c7 smallint)");
$stmt = mysqli_prepare($link, "INSERT INTO test_bind_fetch VALUES (?,?,?,?,?,?,?)");
mysqli_bind_param($stmt, "iiiiiii", $c1,$c2,$c3,$c4,$c5,$c6,$c7);
Modified: trunk/tests/ext/mysqli/025.phpt
===================================================================
--- trunk/tests/ext/mysqli/025.phpt 2007-07-20 15:43:28 UTC (rev 814)
+++ trunk/tests/ext/mysqli/025.phpt 2007-07-20 15:53:33 UTC (rev 815)
@@ -14,12 +14,12 @@
mysqli_query($link,"DROP TABLE IF EXISTS test_bind_fetch");
mysqli_query($link,"CREATE TABLE test_bind_fetch(c1 tinyint,
- c2 tinyint unsigned,
- c3 tinyint not NULL,
- c4 tinyint,
- c5 tinyint,
- c6 tinyint unsigned,
- c7 tinyint)");
+ c2 tinyint unsigned,
+ c3 tinyint not NULL,
+ c4 tinyint,
+ c5 tinyint,
+ c6 tinyint unsigned,
+ c7 tinyint)");
$stmt = mysqli_prepare ($link, "INSERT INTO test_bind_fetch VALUES(?,?,?,?,?,?,?)");
mysqli_bind_param($stmt, "iiiiiii", $c1,$c2,$c3,$c4,$c5,$c6,$c7);
Modified: trunk/tests/ext/mysqli/042.phpt
===================================================================
--- trunk/tests/ext/mysqli/042.phpt 2007-07-20 15:43:28 UTC (rev 814)
+++ trunk/tests/ext/mysqli/042.phpt 2007-07-20 15:53:33 UTC (rev 815)
@@ -14,12 +14,12 @@
mysqli_query($link,"DROP TABLE IF EXISTS test_bind_fetch");
mysqli_query($link,"CREATE TABLE test_bind_fetch(c1 smallint unsigned,
- c2 smallint unsigned,
- c3 smallint,
- c4 smallint,
- c5 smallint,
- c6 smallint unsigned,
- c7 smallint)");
+ c2 smallint unsigned,
+ c3 smallint,
+ c4 smallint,
+ c5 smallint,
+ c6 smallint unsigned,
+ c7 smallint)");
$stmt = mysqli_prepare($link, "INSERT INTO test_bind_fetch VALUES (?,?,?,?,?,?,?)");
mysqli_bind_param($stmt, "iiiiiii", $c1,$c2,$c3,$c4,$c5,$c6,$c7);
Modified: trunk/tests/ext/mysqli/048.phpt
===================================================================
--- trunk/tests/ext/mysqli/048.phpt 2007-07-20 15:43:28 UTC (rev 814)
+++ trunk/tests/ext/mysqli/048.phpt 2007-07-20 15:53:33 UTC (rev 815)
@@ -12,13 +12,13 @@
$mysql->select_db($db);
$mysql->query("DROP TABLE IF EXISTS test_fetch_null");
- $mysql->query("CREATE TABLE test_fetch_null(col1 tinyint, col2 smallint,
- col3 int, col4 bigint,
- col5 float, col6 double,
- col7 date, col8 time,
- col9 varbinary(10),
- col10 varchar(50),
- col11 char(20))");
+ $mysql->query("CREATE TABLE test_fetch_null(col1 tinyint, col2 smallint,
+ col3 int, col4 bigint,
+ col5 float, col6 double,
+ col7 date, col8 time,
+ col9 varbinary(10),
+ col10 varchar(50),
+ col11 char(20))");
$mysql->query("INSERT INTO test_fetch_null(col1,col10, col11) VALUES(1,'foo1',
1000),(2,'foo2', 88),(3,'foo3', 389789)");
Modified: trunk/tests/ext/mysqli/060.phpt
===================================================================
--- trunk/tests/ext/mysqli/060.phpt 2007-07-20 15:43:28 UTC (rev 814)
+++ trunk/tests/ext/mysqli/060.phpt 2007-07-20 15:53:33 UTC (rev 815)
@@ -20,12 +20,12 @@
mysqli_query($link,"DROP TABLE IF EXISTS test_fetch");
mysqli_query($link,"CREATE TABLE test_fetch(c1 smallint unsigned,
- c2 smallint unsigned,
- c3 smallint,
- c4 smallint,
- c5 smallint,
- c6 smallint unsigned,
- c7 smallint)");
+ c2 smallint unsigned,
+ c3 smallint,
+ c4 smallint,
+ c5 smallint,
+ c6 smallint unsigned,
+ c7 smallint)");
mysqli_query($link, "INSERT INTO test_fetch VALUES ( -23, 35999, NULL, -500, -9999999,
-0, 0)");
Modified: trunk/tests/ext/mysqli/065.phpt
===================================================================
--- trunk/tests/ext/mysqli/065.phpt 2007-07-20 15:43:28 UTC (rev 814)
+++ trunk/tests/ext/mysqli/065.phpt 2007-07-20 15:53:33 UTC (rev 815)
@@ -1,8 +1,8 @@
--TEST--
-set character set
+set character set
--SKIPIF--
-<?php
-require_once('skipif.inc');
+<?php
+require_once('skipif.inc');
if (!function_exists('mysqli_set_charset')) {
die('skip mysqli_set_charset() not available');
}
@@ -15,10 +15,10 @@
include "connect.inc";
if (!$mysql = new mysqli($host, $user, $passwd, $db, $port, $socket))
- printf("[001] [%d] %s\n", mysqli_connect_errno(), mysqli_connect_error());
-
+ printf("[001] [%d] %s\n", mysqli_connect_errno(), mysqli_connect_error());
+
if (!mysqli_query($mysql, "SET sql_mode=''"))
- printf("[002] Cannot set SQL-Mode, [%d] %s\n", mysqli_errno($mysql),
mysqli_error($mysql));
+ printf("[002] Cannot set SQL-Mode, [%d] %s\n", mysqli_errno($mysql),
mysqli_error($mysql));
$esc_str = chr(0xbf) . chr(0x5c);
$len = $charset = array();
@@ -27,27 +27,27 @@
if ($mysql->set_charset("latin1")) {
/* 5C should be escaped */
if (3 !== ($tmp = strlen($mysql->real_escape_string($esc_str))))
- printf("[003] Expecting 3/int got %s/%s\n", gettype($tmp), $tmp);
-
+ printf("[003] Expecting 3/int got %s/%s\n", gettype($tmp), $tmp);
+
if ('latin1' !== ($tmp = $mysql->client_encoding()))
- printf("[004] Expecting latin1/string got %s/%s\n", gettype($tmp), $tmp);
+ printf("[004] Expecting latin1/string got %s/%s\n", gettype($tmp), $tmp);
}
if ($res = $mysql->query("SHOW CHARACTER SET LIKE 'gbk'")) {
- $res->free_result();
- if ($mysql->set_charset("gbk")) {
- /* nothing should be escaped, it's a valid gbk character */
-
- if (2 !== ($tmp = strlen($mysql->real_escape_string($esc_str))))
- printf("[005] Expecting 2/int got %s/%s\n", gettype($tmp), $tmp);
-
- if ('gbk' !== ($tmp = $mysql->client_encoding()))
- printf("[005] Expecting gbk/string got %s/%s\n", gettype($tmp), $tmp);;
- }
+ $res->free_result();
+ if ($mysql->set_charset("gbk")) {
+ /* nothing should be escaped, it's a valid gbk character */
+
+ if (2 !== ($tmp = strlen($mysql->real_escape_string($esc_str))))
+ printf("[005] Expecting 2/int got %s/%s\n", gettype($tmp), $tmp);
+
+ if ('gbk' !== ($tmp = $mysql->client_encoding()))
+ printf("[005] Expecting gbk/string got %s/%s\n", gettype($tmp), $tmp);;
+ }
}
$mysql->close();
-
- print "done!";
+
+ print "done!";
?>
--EXPECT--
done!
\ No newline at end of file
Modified: trunk/tests/ext/mysqli/bug33491.phpt
===================================================================
--- trunk/tests/ext/mysqli/bug33491.phpt 2007-07-20 15:43:28 UTC (rev 814)
+++ trunk/tests/ext/mysqli/bug33491.phpt 2007-07-20 15:53:33 UTC (rev 815)
@@ -9,10 +9,10 @@
class DB extends mysqli
{
- public function query_single($query) {
- $result = parent::query($query);
- $result->fetch_row(); // <- Here be crash
- }
+ public function query_single($query) {
+ $result = parent::query($query);
+ $result->fetch_row(); // <- Here be crash
+ }
}
require_once ("connect.inc");
Modified: trunk/tests/ext/mysqli/bug38003.phpt
===================================================================
--- trunk/tests/ext/mysqli/bug38003.phpt 2007-07-20 15:43:28 UTC (rev 814)
+++ trunk/tests/ext/mysqli/bug38003.phpt 2007-07-20 15:53:33 UTC (rev 815)
@@ -7,14 +7,14 @@
class DB extends mysqli {
- private function __construct($hostname, $username, $password, $database) {
- var_dump("DB::__construct() called");
- }
+ private function __construct($hostname, $username, $password, $database) {
+ var_dump("DB::__construct() called");
+ }
}
$DB = new DB();
echo "Done\n";
?>
---EXPECTF--
+--EXPECTF--
Fatal error: Call to private DB::__construct() from invalid context in %s on line %d
| Thread |
|---|
| • PHP mysqlnd svn commit: r815 - trunk/tests/ext/mysqli | uwendel | 20 Jul |