Skip to content

Commit 86e0027

Browse files
committed
Fix some tests for libmysql
1 parent e2b3c0e commit 86e0027

File tree

6 files changed

+14
-6
lines changed

6 files changed

+14
-6
lines changed

ext/mysqli/tests/bug51647.phpt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ require_once('skipif.inc');
66
require_once('skipifconnectfailure.inc');
77
require_once("connect.inc");
88

9+
if (!defined('MYSQLI_CLIENT_SSL_DONT_VERIFY_SERVER_CERT'))
10+
die("skip Requires MYSQLI_CLIENT_SSL_DONT_VERIFY_SERVER_CERT");
11+
912
if ($IS_MYSQLND && !extension_loaded("openssl"))
1013
die("skip PHP streams lack support for SSL. mysqli is compiled to use mysqlnd which uses PHP streams in turn.");
1114

ext/mysqli/tests/bug55283.phpt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ require_once('skipif.inc');
66
require_once('skipifconnectfailure.inc');
77
require_once("connect.inc");
88

9+
if (!defined('MYSQLI_CLIENT_SSL_DONT_VERIFY_SERVER_CERT'))
10+
die("skip Requires MYSQLI_CLIENT_SSL_DONT_VERIFY_SERVER_CERT");
11+
912
if ($IS_MYSQLND && !extension_loaded("openssl"))
1013
die("skip PHP streams lack support for SSL. mysqli is compiled to use mysqlnd which uses PHP streams in turn.");
1114

ext/mysqli/tests/bug74968.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ require_once('skipifconnectfailure.inc');
99
<?php
1010
require_once("connect.inc");
1111

12-
$mysqli = new mysqli("$host:$port", $user, $passwd, $db);
12+
$mysqli = new my_mysqli($host, $user, $passwd, $db, $port, $socket);
1313
abstract class test {
1414
public $a;
1515
}

ext/mysqli/tests/mysqli_constants.phpt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,9 @@ mysqli.allow_local_infile=1
168168
"MYSQLI_STMT_ATTR_PREFETCH_ROWS" => true,
169169
));
170170

171-
$expected_constants['MYSQLI_OPT_SSL_VERIFY_SERVER_CERT'] = true;
171+
if ($version < 80000 || $version >= 100000 || $IS_MYSQLND) {
172+
$expected_constants['MYSQLI_OPT_SSL_VERIFY_SERVER_CERT'] = true;
173+
}
172174

173175
/* pretty dump test, but that is the best way to mimic mysql.c */
174176
if (defined('MYSQLI_DATA_TRUNCATED'))

ext/mysqli/tests/mysqli_query.phpt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ if (!mysqli_query($link, "DROP TABLE IF EXISTS test"))
115115

116116
mysqli_close($link);
117117
?>
118-
--EXPECT--
118+
--EXPECTF--
119119
mysqli_query(): Argument #2 ($query) cannot be empty
120120
array(1) {
121121
["valid"]=>
@@ -126,6 +126,6 @@ array(1) {
126126
string(1) "a"
127127
}
128128
string(1) "a"
129-
mysqli_query(): Argument #3 ($result_mode) must be either MYSQLI_USE_RESULT, or MYSQLI_STORE_RESULT with MYSQLI_ASYNC as an optional bitmask flag
129+
mysqli_query(): Argument #3 ($result_mode) must be either MYSQLI_USE_RESULT, or MYSQLI_STORE_RESULT%S
130130
mysqli object is already closed
131131
done!

ext/pdo_mysql/tests/bug70389.phpt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@ new PDO(PDO_MYSQL_TEST_DSN, PDO_MYSQL_TEST_USER, PDO_MYSQL_TEST_PASS, $flags);
2222
var_dump($flags);
2323

2424
?>
25-
--EXPECT--
25+
--EXPECTF--
2626
array(3) {
27-
[1005]=>
27+
[%d]=>
2828
bool(true)
2929
[1001]=>
3030
bool(true)

0 commit comments

Comments
 (0)