johannes                Thu Jan 22 21:56:46 2009 UTC

  Modified files:              
    /php-src/ext/mysqli/tests   mysqli_class_mysqli_interface.phpt 
                                mysqli_constants.phpt mysqli_poll.phpt 
  Log:
  Fix tests
  
http://cvs.php.net/viewvc.cgi/php-src/ext/mysqli/tests/mysqli_class_mysqli_interface.phpt?r1=1.8&r2=1.9&diff_format=u
Index: php-src/ext/mysqli/tests/mysqli_class_mysqli_interface.phpt
diff -u php-src/ext/mysqli/tests/mysqli_class_mysqli_interface.phpt:1.8 
php-src/ext/mysqli/tests/mysqli_class_mysqli_interface.phpt:1.9
--- php-src/ext/mysqli/tests/mysqli_class_mysqli_interface.phpt:1.8     Tue Jan 
 6 00:56:03 2009
+++ php-src/ext/mysqli/tests/mysqli_class_mysqli_interface.phpt Thu Jan 22 
21:56:45 2009
@@ -45,6 +45,7 @@
                'real_connect'                  => true,
                'real_escape_string'            => true,
                'real_query'                    => true,
+               'refresh'                       => true,
                'rollback'                      => true,
                'select_db'                     => true,
                'set_charset'                   => true,
http://cvs.php.net/viewvc.cgi/php-src/ext/mysqli/tests/mysqli_constants.phpt?r1=1.7&r2=1.8&diff_format=u
Index: php-src/ext/mysqli/tests/mysqli_constants.phpt
diff -u php-src/ext/mysqli/tests/mysqli_constants.phpt:1.7 
php-src/ext/mysqli/tests/mysqli_constants.phpt:1.8
--- php-src/ext/mysqli/tests/mysqli_constants.phpt:1.7  Tue Nov 18 16:54:38 2008
+++ php-src/ext/mysqli/tests/mysqli_constants.phpt      Thu Jan 22 21:56:46 2009
@@ -84,6 +84,14 @@
                "MYSQLI_REPORT_ERROR"                           => true,
                "MYSQLI_REPORT_OFF"                                     => true,
                "MYSQLI_SET_CHARSET_NAME"                       => true,
+               "MYSQLI_REFRESH_GRANT"                          => true,
+               "MYSQLI_REFRESH_LOG"                            => true,
+               "MYSQLI_REFRESH_TABLES"                         => true,
+               "MYSQLI_REFRESH_HOSTS"                          => true,
+               "MYSQLI_REFRESH_STATUS"                         => true,
+               "MYSQLI_REFRESH_THREADS"                        => true,
+               "MYSQLI_REFRESH_SLAVE"                          => true,
+               "MYSQLI_REFRESH_MASTER"                         => true,
        );
 
        /* depends on the build - experimental */
@@ -91,6 +99,10 @@
                $expected_constants['MYSQLI_OPT_INT_AND_FLOAT_NATIVE'] = true;
        }
 
+       if ($IS_MYSQLND || defined('MYSQLI_REFRESH_BACKUP_LOG')) {
+               $expected_constants['MYSQLI_REFRESH_BACKUP_LOG'] = true;
+       }
+
        if ($IS_MYSQLND) {
                $version = 50007 + 1;
                $expected_constants['MYSQLI_OPT_NET_CMD_BUFFER_SIZE'] = true;
http://cvs.php.net/viewvc.cgi/php-src/ext/mysqli/tests/mysqli_poll.phpt?r1=1.1&r2=1.2&diff_format=u
Index: php-src/ext/mysqli/tests/mysqli_poll.phpt
diff -u php-src/ext/mysqli/tests/mysqli_poll.phpt:1.1 
php-src/ext/mysqli/tests/mysqli_poll.phpt:1.2
--- php-src/ext/mysqli/tests/mysqli_poll.phpt:1.1       Tue Nov 18 16:54:38 2008
+++ php-src/ext/mysqli/tests/mysqli_poll.phpt   Thu Jan 22 21:56:46 2009
@@ -28,28 +28,28 @@
        if (NULL !== ($tmp = @mysqli_poll()))
                printf("[002] Expecting NULL got %s\n", var_export($tmp, true));
 
-       if (NULL !== ($tmp = @mysqli_poll(array($link))))
+       $l = array($link);
+       if (NULL !== ($tmp = @mysqli_poll($l)))
                printf("[003] Expecting NULL got %s\n", var_export($tmp, true));
 
-       if (NULL !== ($tmp = @mysqli_poll(array($link), NULL)))
+       $l = array($link); $n = NULL;
+       if (NULL !== ($tmp = @mysqli_poll($l, $n)))
                printf("[004] Expecting NULL got %s\n", var_export($tmp, true));
 
-       if (NULL !== ($tmp = @mysqli_poll(array($link), NULL, NULL)))
+       $l = array($link); $n = NULL;
+       if (NULL !== ($tmp = @mysqli_poll($l, $n, $n)))
                printf("[005] Expecting NULL got %s\n", var_export($tmp, true));
 
-       $int_val = 43;
-       $myerrors = &$int_val;
-
-       if (NULL !== ($tmp = @mysqli_poll(array($link), $myerrors, NULL, 1)))
-               printf("[006] Expecting NULL got %s\n", var_export($tmp, true));
-
-       if (NULL !== ($tmp = @mysqli_poll(array($link), NULL, NULL, -1)))
+       $l = array($link); $e = NULL; $r = NULL;
+       if (NULL !== ($tmp = @mysqli_poll($l, $e, $r, -1)))
                printf("[007] Expecting boolean/false got %s/%s\n", 
gettype($tmp), var_export($tmp, true));
 
-       if (NULL !== ($tmp = @mysqli_poll(array($link), NULL, NULL, 0, -1)))
+       $l = array($link); $e = NULL; $r = NULL;
+       if (NULL !== ($tmp = @mysqli_poll($l, $e, $r, 0, -1)))
                printf("[008] Expecting boolean/false got %s/%s\n", 
gettype($tmp), var_export($tmp, true));
 
-       if (0 !== ($tmp = (mysqli_poll(array($link), array($link), 
array($link), 0, 1))))
+       $read = $error = $reject = array($link);
+       if (0 !== ($tmp = (mysqli_poll($read, $error, $reject, 0, 1))))
                printf("[009] Expecting int/0 got %s/%s\n", gettype($tmp), 
var_export($tmp, true));
 
 



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to