uw Mon Jul 6 15:45:19 2009 UTC Modified files: (Branch: PHP_5_3) /php-src/ext/mysqli/tests connect.inc mysqli_class_mysqli_driver_reflection.phpt mysqli_class_mysqli_reflection.phpt mysqli_class_mysqli_result_reflection.phpt mysqli_class_mysqli_stmt_interface.phpt mysqli_class_mysqli_warning_reflection.phpt mysqli_debug_ini.phpt Log: MFH. Fixing mysqlnd version test to run some four previously skipped tests. There is no proper way to check the mysqlnd version. The best one can do is adapt the tests to what PHP 5.3 and PHP 6.0 return today.
http://cvs.php.net/viewvc.cgi/php-src/ext/mysqli/tests/connect.inc?r1=1.6.2.1.2.2.2.4&r2=1.6.2.1.2.2.2.5&diff_format=u Index: php-src/ext/mysqli/tests/connect.inc diff -u php-src/ext/mysqli/tests/connect.inc:1.6.2.1.2.2.2.4 php-src/ext/mysqli/tests/connect.inc:1.6.2.1.2.2.2.5 --- php-src/ext/mysqli/tests/connect.inc:1.6.2.1.2.2.2.4 Tue Mar 18 16:57:31 2008 +++ php-src/ext/mysqli/tests/connect.inc Mon Jul 6 15:45:19 2009 @@ -26,9 +26,28 @@ if (!$IS_MYSQLND) { $MYSQLND_VERSION = NULL; } else { + /* + The formatting of the version reported by mysqli_get_client_info() + has changed significantly in the past. To get tests working properly + with PHP 5.3.0 and up, we set everything that looks like prior to + PHP 5.3.0 to version 5.0.4 = 5 * 10000 + 0 * 100 + 4 = 50004. + PHP 5.3.0 reports mysqlnd 5.0.5 dev (= 5 * 10000 + 0 * 100 + 5 = 50005. + */ if (preg_match('@Revision:\s+(\d+)\s...@ism', mysqli_get_client_info(), $matches)) { - $MYSQLND_VERSION = (int)$matches[1]; + /* something prior to PHP 5.3.0 */ + $MYSQLND_VERSION = 50004; + } else if (preg_match('@^mysqlnd (\d+)\.(\d+)\.(\d+)....@ism', mysqli_get_client_info(), $matches)) { + /* formatting schema used by PHP 5.3.0 */ + $MYSQLND_VERSION = (int)$matches[1] * 10000 + (int)$matches[2] * 100 + (int)$matches[3]; + } else if (preg_match('@^mysqlnd/PHP 6.0.0-...@ism', mysqli_get_client_info(), $matches)) { + /* + PHP 6.0 at the time of the first PHP 5.3.0 release. + HEAD and 5.3 have been in sync when 5.3.0 was released. + It is at least 5.0.5-dev. + */ + $MYSQLND_VERSION = 50005; } else { + /* unknown */ $MYSQLND_VERSION = -1; } } http://cvs.php.net/viewvc.cgi/php-src/ext/mysqli/tests/mysqli_class_mysqli_driver_reflection.phpt?r1=1.1.2.3&r2=1.1.2.4&diff_format=u Index: php-src/ext/mysqli/tests/mysqli_class_mysqli_driver_reflection.phpt diff -u php-src/ext/mysqli/tests/mysqli_class_mysqli_driver_reflection.phpt:1.1.2.3 php-src/ext/mysqli/tests/mysqli_class_mysqli_driver_reflection.phpt:1.1.2.4 --- php-src/ext/mysqli/tests/mysqli_class_mysqli_driver_reflection.phpt:1.1.2.3 Tue Mar 18 16:57:31 2008 +++ php-src/ext/mysqli/tests/mysqli_class_mysqli_driver_reflection.phpt Mon Jul 6 15:45:19 2009 @@ -15,8 +15,8 @@ */ if (!$IS_MYSQLND) die("skip Test has been written for the latest version of mysqlnd only"); -if ($MYSQLND_VERSION < 576) - die("skip Test requires mysqlnd Revision 576 or newer"); +if ($MYSQLND_VERSION < 50005) + die("skip Test requires mysqlnd Revision 5.0.4 or newer"); ?> --FILE-- <?php http://cvs.php.net/viewvc.cgi/php-src/ext/mysqli/tests/mysqli_class_mysqli_reflection.phpt?r1=1.1.2.3&r2=1.1.2.4&diff_format=u Index: php-src/ext/mysqli/tests/mysqli_class_mysqli_reflection.phpt diff -u php-src/ext/mysqli/tests/mysqli_class_mysqli_reflection.phpt:1.1.2.3 php-src/ext/mysqli/tests/mysqli_class_mysqli_reflection.phpt:1.1.2.4 --- php-src/ext/mysqli/tests/mysqli_class_mysqli_reflection.phpt:1.1.2.3 Tue Mar 18 16:57:31 2008 +++ php-src/ext/mysqli/tests/mysqli_class_mysqli_reflection.phpt Mon Jul 6 15:45:19 2009 @@ -15,8 +15,8 @@ */ if (!$IS_MYSQLND) die("skip Test has been written for the latest version of mysqlnd only"); -if ($MYSQLND_VERSION < 576) - die("skip Test requires mysqlnd Revision 576 or newer"); +if ($MYSQLND_VERSION < 50004) + die("skip Test requires mysqlnd Revision 5.0.4 or newer"); ?> --FILE-- @@ -423,6 +423,22 @@ Number of Parameters: 0 Number of Required Parameters: 0 +Inspecting method 'poll' +isFinal: no +isAbstract: no +isPublic: yes +isPrivate: no +isProtected: no +isStatic: no +isConstructor: no +isDestructor: no +isInternal: yes +isUserDefined: no +returnsReference: no +Modifiers: 256 +Number of Parameters: 0 +Number of Required Parameters: 0 + Inspecting method 'prepare' isFinal: no isAbstract: no @@ -503,6 +519,38 @@ Number of Parameters: 0 Number of Required Parameters: 0 +Inspecting method 'reap_async_query' +isFinal: no +isAbstract: no +isPublic: yes +isPrivate: no +isProtected: no +isStatic: no +isConstructor: no +isDestructor: no +isInternal: yes +isUserDefined: no +returnsReference: no +Modifiers: 256 +Number of Parameters: 0 +Number of Required Parameters: 0 + +Inspecting method 'refresh' +isFinal: no +isAbstract: no +isPublic: yes +isPrivate: no +isProtected: no +isStatic: no +isConstructor: no +isDestructor: no +isInternal: yes +isUserDefined: no +returnsReference: no +Modifiers: 256 +Number of Parameters: 0 +Number of Required Parameters: 0 + Inspecting method 'rollback' isFinal: no isAbstract: no @@ -799,5 +847,4 @@ Default property 'sqlstate' Default property 'thread_id' Default property 'warning_count' -done! - +done! \ No newline at end of file http://cvs.php.net/viewvc.cgi/php-src/ext/mysqli/tests/mysqli_class_mysqli_result_reflection.phpt?r1=1.2.2.3&r2=1.2.2.4&diff_format=u Index: php-src/ext/mysqli/tests/mysqli_class_mysqli_result_reflection.phpt diff -u php-src/ext/mysqli/tests/mysqli_class_mysqli_result_reflection.phpt:1.2.2.3 php-src/ext/mysqli/tests/mysqli_class_mysqli_result_reflection.phpt:1.2.2.4 --- php-src/ext/mysqli/tests/mysqli_class_mysqli_result_reflection.phpt:1.2.2.3 Tue Mar 18 16:57:31 2008 +++ php-src/ext/mysqli/tests/mysqli_class_mysqli_result_reflection.phpt Mon Jul 6 15:45:19 2009 @@ -17,8 +17,8 @@ */ if (!$IS_MYSQLND) die("skip Test has been written for the latest version of mysqlnd only"); -if ($MYSQLND_VERSION < 576) - die("skip Test requires mysqlnd Revision 576 or newer"); +if ($MYSQLND_VERSION < 50004) + die("skip Test requires mysqlnd Revision 5.0.4 or newer"); ?> --FILE-- <?php http://cvs.php.net/viewvc.cgi/php-src/ext/mysqli/tests/mysqli_class_mysqli_stmt_interface.phpt?r1=1.2.2.6&r2=1.2.2.7&diff_format=u Index: php-src/ext/mysqli/tests/mysqli_class_mysqli_stmt_interface.phpt diff -u php-src/ext/mysqli/tests/mysqli_class_mysqli_stmt_interface.phpt:1.2.2.6 php-src/ext/mysqli/tests/mysqli_class_mysqli_stmt_interface.phpt:1.2.2.7 --- php-src/ext/mysqli/tests/mysqli_class_mysqli_stmt_interface.phpt:1.2.2.6 Thu May 28 14:33:42 2009 +++ php-src/ext/mysqli/tests/mysqli_class_mysqli_stmt_interface.phpt Mon Jul 6 15:45:19 2009 @@ -187,5 +187,5 @@ Prepare using the constructor: -Warning: mysqli_stmt::__construct() expects parameter 2 to be string, object given in %s on line %d +Warning: mysqli_stmt::__construct() expects parameter 2 to be %binary_string_optional%, object given in %s on line %d done! \ No newline at end of file http://cvs.php.net/viewvc.cgi/php-src/ext/mysqli/tests/mysqli_class_mysqli_warning_reflection.phpt?r1=1.1.2.3&r2=1.1.2.4&diff_format=u Index: php-src/ext/mysqli/tests/mysqli_class_mysqli_warning_reflection.phpt diff -u php-src/ext/mysqli/tests/mysqli_class_mysqli_warning_reflection.phpt:1.1.2.3 php-src/ext/mysqli/tests/mysqli_class_mysqli_warning_reflection.phpt:1.1.2.4 --- php-src/ext/mysqli/tests/mysqli_class_mysqli_warning_reflection.phpt:1.1.2.3 Tue Mar 18 16:57:31 2008 +++ php-src/ext/mysqli/tests/mysqli_class_mysqli_warning_reflection.phpt Mon Jul 6 15:45:19 2009 @@ -16,8 +16,8 @@ */ if (!$IS_MYSQLND) die("skip Test has been written for the latest version of mysqlnd only"); -if ($MYSQLND_VERSION < 576) - die("skip Test requires mysqlnd Revision 576 or newer"); +if ($MYSQLND_VERSION < 50004) + die("skip Test requires mysqlnd Revision 5.0.4 or newer"); ?> --FILE-- <?php http://cvs.php.net/viewvc.cgi/php-src/ext/mysqli/tests/mysqli_debug_ini.phpt?r1=1.1.2.5&r2=1.1.2.6&diff_format=u Index: php-src/ext/mysqli/tests/mysqli_debug_ini.phpt diff -u php-src/ext/mysqli/tests/mysqli_debug_ini.phpt:1.1.2.5 php-src/ext/mysqli/tests/mysqli_debug_ini.phpt:1.1.2.6 --- php-src/ext/mysqli/tests/mysqli_debug_ini.phpt:1.1.2.5 Thu May 28 14:33:42 2009 +++ php-src/ext/mysqli/tests/mysqli_debug_ini.phpt Mon Jul 6 15:45:19 2009 @@ -15,8 +15,8 @@ die("skip: debug functionality not enabled"); require_once('connect.inc'); -if (!$IS_MYSQLND || ($MYSQLND_VERSION < 940)) - die("skip needs mysqlnd version/revision 940+"); +if (!$IS_MYSQLND || ($MYSQLND_VERSION < 50004)) + die("skip needs mysqlnd version/revision 5.0.4"); if (!$fp = @fopen('/tmp/mysqli_debug_phpt.trace', 'w')) die("skip PHP cannot create a file in /tmp/mysqli_debug_phpt");
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php