Author: uwendel
Date: 2007-07-12 21:40:06 +0200 (Thu, 12 Jul 2007)
New Revision: 750
Modified:
trunk/tests/ext/mysqli/bug28817.phpt
trunk/tests/ext/mysqli/bug29311.phpt
trunk/tests/ext/mysqli/bug30967.phpt
trunk/tests/ext/mysqli/bug31141.phpt
trunk/tests/ext/mysqli/bug31668.phpt
trunk/tests/ext/mysqli/bug32405.phpt
trunk/tests/ext/mysqli/bug33090.phpt
trunk/tests/ext/mysqli/bug33263.phpt
trunk/tests/ext/mysqli/bug34785.phpt
trunk/tests/ext/mysqli/bug34810.phpt
trunk/tests/ext/mysqli/bug35103.phpt
trunk/tests/ext/mysqli/bug35517.phpt
trunk/tests/ext/mysqli/bug35759.phpt
trunk/tests/ext/mysqli/bug36802.phpt
trunk/tests/ext/mysqli/bug36949.phpt
trunk/tests/ext/mysqli/bug37090.phpt
trunk/tests/ext/mysqli/bug38710.phpt
Log:
Preparing tests for php.net merge
Modified: trunk/tests/ext/mysqli/bug28817.phpt
===================================================================
--- trunk/tests/ext/mysqli/bug28817.phpt 2007-07-12 19:15:17 UTC (rev 749)
+++ trunk/tests/ext/mysqli/bug28817.phpt 2007-07-12 19:40:06 UTC (rev 750)
@@ -5,7 +5,7 @@
--FILE--
<?php
include "connect.inc";
-
+
class my_mysql extends mysqli {
public $p_test;
@@ -26,7 +26,8 @@
var_dump($mysql->errno > 0);
- $mysql->close();
+ $mysql->close();
+ print "done!";
?>
--EXPECTF--
array(2) {
@@ -37,3 +38,4 @@
}
NULL
bool(true)
+done!
\ No newline at end of file
Modified: trunk/tests/ext/mysqli/bug29311.phpt
===================================================================
--- trunk/tests/ext/mysqli/bug29311.phpt 2007-07-12 19:15:17 UTC (rev 749)
+++ trunk/tests/ext/mysqli/bug29311.phpt 2007-07-12 19:40:06 UTC (rev 750)
@@ -5,7 +5,7 @@
--FILE--
<?php
include "connect.inc";
-
+
/* class 1 calls parent constructor */
class mysql1 extends mysqli {
function __construct() {
@@ -16,7 +16,7 @@
/* class 2 has an own constructor */
class mysql2 extends mysqli {
-
+
function __construct() {
global $host, $user, $passwd, $db, $port, $socket;
$this->connect($host, $user, $passwd, $db, $port, $socket);
@@ -25,24 +25,26 @@
/* class 3 has no constructor */
class mysql3 extends mysqli {
-
+
}
- $foo[0] = new mysql1();
- $foo[1] = new mysql2();
+ $foo[0] = new mysql1();
+ $foo[1] = new mysql2();
$foo[2] = new mysql3($host, $user, $passwd, $db, $port, $socket);
for ($i=0; $i < 3; $i++) {
if (($result = $foo[$i]->query("SELECT DATABASE()"))) {
$row = $result->fetch_row();
- printf("%d: %s\n", $i, ($db == $row[0]) ? "test" : "failure");
+ printf("%d: %s\n", $i, ($db === $row[0]) ? "ok" : "failure");
$result->close();
}
$foo[$i]->close();
}
+ print "done!"
?>
--EXPECTF--
-0: test
-1: test
-2: test
+0: ok
+1: ok
+2: ok
+done!
\ No newline at end of file
Modified: trunk/tests/ext/mysqli/bug30967.phpt
===================================================================
--- trunk/tests/ext/mysqli/bug30967.phpt 2007-07-12 19:15:17 UTC (rev 749)
+++ trunk/tests/ext/mysqli/bug30967.phpt 2007-07-12 19:40:06 UTC (rev 750)
@@ -5,7 +5,7 @@
--FILE--
<?php
include "connect.inc";
-
+
class mysql1 extends mysqli {
}
@@ -17,7 +17,9 @@
$mysql->query("THIS DOES NOT WORK");
printf("%d\n", $mysql->errno);
- $mysql->close();
+ $mysql->close();
+ print "done!";
?>
--EXPECTF--
1064
+done!
\ No newline at end of file
Modified: trunk/tests/ext/mysqli/bug31141.phpt
===================================================================
--- trunk/tests/ext/mysqli/bug31141.phpt 2007-07-12 19:15:17 UTC (rev 749)
+++ trunk/tests/ext/mysqli/bug31141.phpt 2007-07-12 19:40:06 UTC (rev 750)
@@ -26,4 +26,4 @@
%s(3) "foo"
[1]=>
%s(3) "bar"
-}
+}
\ No newline at end of file
Modified: trunk/tests/ext/mysqli/bug31668.phpt
===================================================================
--- trunk/tests/ext/mysqli/bug31668.phpt 2007-07-12 19:15:17 UTC (rev 749)
+++ trunk/tests/ext/mysqli/bug31668.phpt 2007-07-12 19:40:06 UTC (rev 750)
@@ -9,48 +9,69 @@
$mysql = new mysqli($host, $user, $passwd, $db, $port, $socket);
$mysql->multi_query('SELECT 1;SELECT 2');
do {
- $res = $mysql->store_result();
+ $res = $mysql->store_result();
if ($mysql->errno == 0) {
while ($arr = $res->fetch_assoc()) {
var_dump($arr);
}
$res->free();
}
- } while ($mysql->next_result());
+ } while (@$mysql->next_result());
var_dump($mysql->error, __LINE__);
$mysql->close();
$mysql = new mysqli($host, $user, $passwd, $db, $port, $socket);
$mysql->multi_query('SELECT 1;SELECT 2');
do {
- $res = $mysql->store_result();
+ $res = $mysql->store_result();
if ($mysql->errno == 0) {
while ($arr = $res->fetch_assoc()) {
var_dump($arr);
}
$res->free();
}
- } while ($mysql->next_result());
+ } while (@$mysql->next_result());
var_dump($mysql->error, __LINE__);
?>
--EXPECTF--
array(1) {
[1]=>
- %s(1) "1"
+ string(1) "1"
}
array(1) {
[2]=>
- %s(1) "2"
+ string(1) "2"
}
-%s(0) ""
+string(0) ""
int(%d)
array(1) {
[1]=>
- %s(1) "1"
+ string(1) "1"
}
array(1) {
[2]=>
- %s(1) "2"
+ string(1) "2"
}
-%s(0) ""
+string(0) ""
int(%d)
+--UEXPECTF--
+array(1) {
+ [1]=>
+ unicode(1) "1"
+}
+array(1) {
+ [2]=>
+ unicode(1) "2"
+}
+unicode(0) ""
+int(%d)
+array(1) {
+ [1]=>
+ unicode(1) "1"
+}
+array(1) {
+ [2]=>
+ unicode(1) "2"
+}
+unicode(0) ""
+int(%d)
\ No newline at end of file
Modified: trunk/tests/ext/mysqli/bug32405.phpt
===================================================================
--- trunk/tests/ext/mysqli/bug32405.phpt 2007-07-12 19:15:17 UTC (rev 749)
+++ trunk/tests/ext/mysqli/bug32405.phpt 2007-07-12 19:40:06 UTC (rev 750)
@@ -10,7 +10,7 @@
$link = mysqli_connect($host, $user, $passwd, $db, $port, $socket);
mysqli_select_db($link, $db);
mysqli_query($link, "SET sql_mode=''");
-
+
/* two fields are needed. the problem does not occur with 1 field only selected. */
$link->query("DROP TABLE IF EXISTS test_users");
$link->query("CREATE TABLE test_users(user_id int(10) unsigned NOT NULL
auto_increment, login varchar(50) default '', PRIMARY KEY (user_id))");
@@ -28,13 +28,25 @@
mysqli_query($link,"DROP TABLE test_users");
mysqli_close($link);
+ print "done!";
?>
--EXPECTF--
int(1)
-%s(5) "user1"
+string(5) "user1"
int(2)
-%s(5) "user2"
+string(5) "user2"
int(3)
-%s(5) "user3"
+string(5) "user3"
int(4)
-%s(5) "user4"
+string(5) "user4"
+done!
+--UEXPECTF--
+int(1)
+unicode(5) "user1"
+int(2)
+unicode(5) "user2"
+int(3)
+unicode(5) "user3"
+int(4)
+unicode(5) "user4"
+done!
\ No newline at end of file
Modified: trunk/tests/ext/mysqli/bug33090.phpt
===================================================================
--- trunk/tests/ext/mysqli/bug33090.phpt 2007-07-12 19:15:17 UTC (rev 749)
+++ trunk/tests/ext/mysqli/bug33090.phpt 2007-07-12 19:40:06 UTC (rev 750)
@@ -13,9 +13,11 @@
if (!($link->prepare("this makes no sense"))) {
printf("%d\n", $link->errno);
printf("%s\n", $link->sqlstate);
- }
+ }
$link->close();
+ print "done!";
?>
--EXPECT--
1064
42000
+done!
\ No newline at end of file
Modified: trunk/tests/ext/mysqli/bug33263.phpt
===================================================================
--- trunk/tests/ext/mysqli/bug33263.phpt 2007-07-12 19:15:17 UTC (rev 749)
+++ trunk/tests/ext/mysqli/bug33263.phpt 2007-07-12 19:40:06 UTC (rev 750)
@@ -1,5 +1,5 @@
--TEST--
-bug #33263 (mysqli_real_connect in __construct)
+bug #33263 (mysqli_real_connect in __construct)
--SKIPIF--
<?php require_once('skipif.inc'); ?>
<?php require_once('skipifemb.inc'); ?>
@@ -31,4 +31,4 @@
print "done!";
?>
--EXPECTF--
-done!
+done!
\ No newline at end of file
Modified: trunk/tests/ext/mysqli/bug34785.phpt
===================================================================
--- trunk/tests/ext/mysqli/bug34785.phpt 2007-07-12 19:15:17 UTC (rev 749)
+++ trunk/tests/ext/mysqli/bug34785.phpt 2007-07-12 19:40:06 UTC (rev 750)
@@ -41,7 +41,13 @@
var_dump($row[0]);
mysqli_close($link);
+ print "done!";
?>
--EXPECTF--
-%s(3) "foo"
-%s(3) "bar"
+string(3) "foo"
+string(3) "bar"
+done!
+--UEXPECTF--
+unicode(3) "foo"
+unicode(3) "bar"
+done!
\ No newline at end of file
Modified: trunk/tests/ext/mysqli/bug34810.phpt
===================================================================
--- trunk/tests/ext/mysqli/bug34810.phpt 2007-07-12 19:15:17 UTC (rev 749)
+++ trunk/tests/ext/mysqli/bug34810.phpt 2007-07-12 19:40:06 UTC (rev 750)
@@ -5,35 +5,35 @@
--FILE--
<?php
-class DbConnection {
+class DbConnection {
public function connect() {
include "connect.inc";
$link = mysqli_connect($host, $user, $passwd, $db, $port, $socket);
- var_dump($link);
-
+ var_dump($link);
+
$link = mysqli_init();
var_dump($link);
-
+
$mysql = new mysqli($host, $user, $passwd, $db, $port, $socket);
$mysql->query("DROP TABLE IF EXISTS test_warnings");
$mysql->query("CREATE TABLE test_warnings (a int not null)");
$mysql->query("SET sql_mode=''");
$mysql->query("INSERT INTO test_warnings VALUES (1),(2),(NULL)");
var_dump(mysqli_warning::__construct($mysql));
- }
-}
+ }
+}
-$db = new DbConnection();
+$db = new DbConnection();
$db->connect();
echo "Done\n";
?>
---EXPECTF--
+--EXPECTF--
object(mysqli)#%d (0) {
}
object(mysqli)#%d (0) {
}
object(mysqli_warning)#%d (0) {
}
-Done
+Done
\ No newline at end of file
Modified: trunk/tests/ext/mysqli/bug35103.phpt
===================================================================
--- trunk/tests/ext/mysqli/bug35103.phpt 2007-07-12 19:15:17 UTC (rev 749)
+++ trunk/tests/ext/mysqli/bug35103.phpt 2007-07-12 19:40:06 UTC (rev 750)
@@ -19,7 +19,7 @@
$mysql->query("DROP TABLE IF EXISTS test_buint");
$mysql->query("CREATE TABLE test_buint (a bigint(20) unsigned default NULL)");
$mysql->query("INSERT INTO test_buint VALUES
(18446744073709551615),(9223372036854775807),(9223372036854775808),(2147483647),(2147483649),(4294967295)");
-
+
$stmt = $mysql->prepare("SELECT a FROM test_bint ORDER BY a");
$stmt->bind_result($v);
$stmt->execute();
@@ -47,6 +47,7 @@
$mysql->multi_query($drop);
$mysql->close();
+ print "done!";
?>
--EXPECT--
BIG INT SIGNED, TEST
@@ -66,3 +67,4 @@
9223372036854775807
9223372036854775808
18446744073709551615
+done!
\ No newline at end of file
Modified: trunk/tests/ext/mysqli/bug35517.phpt
===================================================================
--- trunk/tests/ext/mysqli/bug35517.phpt 2007-07-12 19:15:17 UTC (rev 749)
+++ trunk/tests/ext/mysqli/bug35517.phpt 2007-07-12 19:40:06 UTC (rev 750)
@@ -10,7 +10,7 @@
$mysql->query("CREATE TABLE temp (id INT UNSIGNED NOT NULL)");
$mysql->query("INSERT INTO temp (id) VALUES
(3000000897),(3800001532),(3900002281),(3100059612)");
-
+
$expected_ids = array('3000000897', '3100059612', '3800001532', '3900002281', );
$stmt = $mysql->prepare("SELECT id FROM temp ORDER BY id ASC");
@@ -31,4 +31,4 @@
print "done!";
?>
--EXPECTF--
-done!
+done!
\ No newline at end of file
Modified: trunk/tests/ext/mysqli/bug35759.phpt
===================================================================
--- trunk/tests/ext/mysqli/bug35759.phpt 2007-07-12 19:15:17 UTC (rev 749)
+++ trunk/tests/ext/mysqli/bug35759.phpt 2007-07-12 19:40:06 UTC (rev 750)
@@ -23,7 +23,7 @@
$mysql->query($create);
$mysql->query("INSERT INTO blobby (a0) VALUES ('')");
-
+
$stmt = $mysql->prepare("SELECT * FROM blobby");
$stmt->execute();
$stmt->store_result();
Modified: trunk/tests/ext/mysqli/bug36802.phpt
===================================================================
--- trunk/tests/ext/mysqli/bug36802.phpt 2007-07-12 19:15:17 UTC (rev 749)
+++ trunk/tests/ext/mysqli/bug36802.phpt 2007-07-12 19:40:06 UTC (rev 750)
@@ -1,12 +1,12 @@
--TEST--
-bug #36802 : crashes with mysql_init
+bug #36802 : crashes with mysql_init
--SKIPIF--
<?php require_once('skipif.inc'); ?>
--FILE--
<?php
class my_mysqli extends mysqli {
- function __construct()
+ function __construct()
{
}
}
@@ -24,13 +24,11 @@
}
$x[1] = @$mysql->query("SELECT 'foo' FROM DUAL");
- /* following operations should work */
+ /* following operations should work */
$x[2] = ($mysql->client_version > 0);
$x[3] = $mysql->errno;
$mysql->close();
-
-
var_dump($x);
?>
--EXPECT--
Modified: trunk/tests/ext/mysqli/bug36949.phpt
===================================================================
--- trunk/tests/ext/mysqli/bug36949.phpt 2007-07-12 19:15:17 UTC (rev 749)
+++ trunk/tests/ext/mysqli/bug36949.phpt 2007-07-12 19:40:06 UTC (rev 750)
@@ -44,7 +44,9 @@
$A = new A();
$B = new B();
+print "done!";
?>
--EXPECTF--
%d%d%d%d-%d%d-%d%d %d%d:%d%d:%d%d<br>
%d%d%d%d-%d%d-%d%d %d%d:%d%d:%d%d<br>
+done!
\ No newline at end of file
Modified: trunk/tests/ext/mysqli/bug37090.phpt
===================================================================
--- trunk/tests/ext/mysqli/bug37090.phpt 2007-07-12 19:15:17 UTC (rev 749)
+++ trunk/tests/ext/mysqli/bug37090.phpt 2007-07-12 19:40:06 UTC (rev 750)
@@ -1,13 +1,13 @@
--TEST--
Bug #37090 (mysqli_set_charset return code)
--SKIPIF--
-<?php
-require_once('skipif.inc');
+<?php
+require_once('skipif.inc');
if (!function_exists('mysqli_set_charset')) {
die('skip mysqli_set_charset() not available');
}
if (ini_get('unicode.semantics')) {
- die("skip Functionality not available in unicode mode");
+ die("skip Functionality not available in unicode mode");
}
?>
--FILE--
Modified: trunk/tests/ext/mysqli/bug38710.phpt
===================================================================
--- trunk/tests/ext/mysqli/bug38710.phpt 2007-07-12 19:15:17 UTC (rev 749)
+++ trunk/tests/ext/mysqli/bug38710.phpt 2007-07-12 19:40:06 UTC (rev 750)
@@ -18,5 +18,5 @@
echo "Done";
?>
---EXPECTF--
-Done
+--EXPECTF--
+Done
\ No newline at end of file
| Thread |
|---|
| • PHP mysqlnd svn commit: r750 - trunk/tests/ext/mysqli | uwendel | 12 Jul |