uw                                       Mon, 21 Sep 2009 10:16:44 +0000

Revision: http://svn.php.net/viewvc?view=revision&revision=288517

Log:
Not nice but neither the MySQL Client Library not mysqlnd are supposed to 
detect invalid flags. Therefore: fixing test

Changed paths:
    U   php/php-src/branches/PHP_5_3/ext/mysqli/tests/mysqli_stmt_attr_set.phpt
    U   php/php-src/trunk/ext/mysqli/tests/mysqli_stmt_attr_set.phpt

Modified: 
php/php-src/branches/PHP_5_3/ext/mysqli/tests/mysqli_stmt_attr_set.phpt
===================================================================
--- php/php-src/branches/PHP_5_3/ext/mysqli/tests/mysqli_stmt_attr_set.phpt     
2009-09-21 10:06:13 UTC (rev 288516)
+++ php/php-src/branches/PHP_5_3/ext/mysqli/tests/mysqli_stmt_attr_set.phpt     
2009-09-21 10:16:44 UTC (rev 288517)
@@ -1,5 +1,5 @@
 --TEST--
-mysqli_stmt_attr_set() - KNOWN ISSUE: mysqlnd does not check for invalid codes
+mysqli_stmt_attr_set() - mysqlnd does not check for invalid codes
 --SKIPIF--
 <?php
 require_once('skipif.inc');
@@ -58,8 +58,9 @@
                do {
                        $invalid_attr = mt_rand(-1 * PHP_INT_MAX + 1, 
PHP_INT_MAX);
                } while (in_array($invalid_attr, $valid_attr));
-               if (false !== ($tmp = @mysqli_stmt_attr_set($stmt, 
$invalid_attr, 0)))
-                       printf("[006b] Expecting boolean/false for attribute 
%d, got %s/%s\n", $invalid_attr, gettype($tmp), $tmp);
+               if (true !== ($tmp = @mysqli_stmt_attr_set($stmt, 
$invalid_attr, 0)))
+                       /* Although it may be desired to get false neither the 
MySQL Client Library nor mysqlnd are supposed to detect invalid codes */
+                       printf("[006b] Expecting boolean/true for attribute %d, 
got %s/%s\n", $invalid_attr, gettype($tmp), $tmp);
        }
        $stmt->close();


Modified: php/php-src/trunk/ext/mysqli/tests/mysqli_stmt_attr_set.phpt
===================================================================
--- php/php-src/trunk/ext/mysqli/tests/mysqli_stmt_attr_set.phpt        
2009-09-21 10:06:13 UTC (rev 288516)
+++ php/php-src/trunk/ext/mysqli/tests/mysqli_stmt_attr_set.phpt        
2009-09-21 10:16:44 UTC (rev 288517)
@@ -1,5 +1,5 @@
 --TEST--
-mysqli_stmt_attr_set() - KNOWN ISSUE: mysqlnd does not check for invalid codes
+mysqli_stmt_attr_set() - mysqlnd does not check for invalid codes
 --SKIPIF--
 <?php
 require_once('skipif.inc');
@@ -58,8 +58,9 @@
                do {
                        $invalid_attr = mt_rand(-1 * PHP_INT_MAX + 1, 
PHP_INT_MAX);
                } while (in_array($invalid_attr, $valid_attr));
-               if (false !== ($tmp = @mysqli_stmt_attr_set($stmt, 
$invalid_attr, 0)))
-                       printf("[006b] Expecting boolean/false for attribute 
%d, got %s/%s\n", $invalid_attr, gettype($tmp), $tmp);
+               if (true !== ($tmp = @mysqli_stmt_attr_set($stmt, 
$invalid_attr, 0)))
+                       /* Although it may be desired to get false neither the 
MySQL Client Library nor mysqlnd are supposed to detect invalid codes */
+                       printf("[006b] Expecting boolean/true for attribute %d, 
got %s/%s\n", $invalid_attr, gettype($tmp), $tmp);
        }
        $stmt->close();


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

Reply via email to