com php-src: Reduce case where this test will fails: - no connection AND no mysqli extension: ext/pdo_mysql/tests/pdo_mysql_class_c onstants.phpt
| From: | Remi Collet | Date: | Mon, 03 Dec 2012 14:32:52 +0000 |
| Subject: | com php-src: Reduce case where this test will fails: - no connection AND no mysqli extension: ext/pdo_mysql/tests/pdo_mysql_class_c onstants.phpt | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-70646@lists.php.net to get a copy of this message | ||
Commit: 784850211ed9e0bd50c2dac6e26746c0e9a347b7
Author: Remi Collet <remi@php.net> Mon, 3 Dec 2012 15:32:52 +0100
Parents: 17dd769ab0362fdf150b39a18fab12414ba490d8
Branches: PHP-5.5 master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=784850211ed9e0bd50c2dac6e26746c0e9a347b7
Log:
Reduce case where this test will fails:
- no connection AND no mysqli extension
So, will succeed when no configured connection, but mysqli available.
Changed paths:
M ext/pdo_mysql/tests/pdo_mysql_class_constants.phpt
Diff:
diff --git a/ext/pdo_mysql/tests/pdo_mysql_class_constants.phpt
b/ext/pdo_mysql/tests/pdo_mysql_class_constants.phpt
index 2545307..e52e4b5 100644
--- a/ext/pdo_mysql/tests/pdo_mysql_class_constants.phpt
+++ b/ext/pdo_mysql/tests/pdo_mysql_class_constants.phpt
@@ -29,7 +29,8 @@ require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'skipif.inc');
$expected['MYSQL_ATTR_READ_DEFAULT_GROUP'] = true;
}
- if (extension_loaded('mysqli') && stristr(mysqli_get_client_info(),
"mysqlnd")
+ if (extension_loaded('mysqli')
+ && (stristr(mysqli_get_client_info(), "mysqlnd") ||
mysqli_get_client_version() > 50605)
|| MySQLPDOTest::getClientVersion(MySQLPDOTest::factory()) > 50605) {
/* XXX the MySQL client library version isn't exposed with any
constants, the single possibility is to use the PDO::getAttribute().