Author: uwendel
Date: 2007-03-16 10:54:13 +0100 (Fri, 16 Mar 2007)
New Revision: 171
Modified:
trunk/ext/mysqli/tests/mysqli_class_mysqli_result_interface.phpt
Log:
Fixed the test to be libmysql and mysqlnd compatible.
Modified: trunk/ext/mysqli/tests/mysqli_class_mysqli_result_interface.phpt
===================================================================
--- trunk/ext/mysqli/tests/mysqli_class_mysqli_result_interface.phpt 2007-03-16 09:48:32
UTC (rev 170)
+++ trunk/ext/mysqli/tests/mysqli_class_mysqli_result_interface.phpt 2007-03-16 09:54:13
UTC (rev 171)
@@ -20,10 +20,25 @@
var_dump(get_parent_class($mysqli_result));
printf("\nMethods:\n");
- $methods = get_class_methods($mysqli_result);
+ $methods = get_class_methods($mysqli_result);
+ $have_mysqlnd = stristr(mysqli_get_client_info(), 'mysqlnd');
+ $mysqlnd_only = array(
+ 'fetch_all' => 'fetch_all',
+ );
+
sort($methods);
- foreach ($methods as $k => $method)
- printf("%s\n", $method);
+ foreach ($methods as $k => $method) {
+ if ($have_mysqlnd && (isset($mysqlnd_only[$method]))) {
+ unset($mysqlnd_only[$method]);
+ continue;
+ }
+ printf("%s\n", $method);
+ }
+ if ($have_mysqlnd && !empty($mysqlnd_only)) {
+ printf("Missing methods: \n");
+ foreach ($mysqlnd_only as $k => $v)
+ printf("%s\n", $k);
+ }
printf("\nClass variables:\n");
$variables = get_class_vars(get_class($mysqli_result));
@@ -63,7 +78,6 @@
__construct
close
data_seek
-fetch_all
fetch_array
fetch_assoc
fetch_field
| Thread |
|---|
| • PHP mysqlnd svn commit: r171 - trunk/ext/mysqli/tests | uwendel | 16 Mar |