List:Commits« Previous MessageNext Message »
From:uwendel Date:March 16 2007 11:07am
Subject:PHP mysqlnd svn commit: r174 - trunk/ext/mysqli/tests
View as plain text  
Author: uwendel
Date: 2007-03-16 12:07:47 +0100 (Fri, 16 Mar 2007)
New Revision: 174

Modified:
   trunk/ext/mysqli/tests/mysqli_ssl_set.phpt
Log:
Either the tests is wrong or the documentation is wrong. I guess the documentation is
wrong.


Modified: trunk/ext/mysqli/tests/mysqli_ssl_set.phpt
===================================================================
--- trunk/ext/mysqli/tests/mysqli_ssl_set.phpt	2007-03-16 10:54:26 UTC (rev 173)
+++ trunk/ext/mysqli/tests/mysqli_ssl_set.phpt	2007-03-16 11:07:47 UTC (rev 174)
@@ -31,13 +31,28 @@
         
     if (!is_null($tmp = @mysqli_ssl_set($link, $link, $link, $link, $link)))
         printf("[006] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-        
-    if (true !== ($tmp = @mysqli_ssl_set($link, $link, $link, $link, $link, $link)))
-        printf("[007] Expecting boolean/true, got %s/%s\n", gettype($tmp), $tmp);    
-
-    $link = mysqli_init();
+      
+    /*
+    This function always returns TRUE value.     
+    */
+    $link = mysqli_init();    
+    if (true !== ($tmp = @mysqli_ssl_set(
+        $link,
+        'The path name to the key file.', 
+        'The path name to the certificate file.',
+        'The path name to the certificate authority file.',
+        'The pathname to a directory that contains trusted SSL CA certificates in PEM
format.',
+        'A list of allowable ciphers to use for SSL encryption.')))
+        printf("[007] Expecting boolean/true, got %s/%s\n", gettype($tmp), $tmp);
+    
+    /*
+    If SSL setup is incorrect mysqli_real_connect() 
+    will return an error when you attempt to connect.
+    
+    ... and the above SSL setup should be always incorrect.
+    */        
     if (false !== ($tmp = mysqli_real_connect($link, $host, $user, $passwd, $db, $port,
$socket)))
-        printf("[008] Expecting boolean/false, got %s/%s\n", gettype($tmp), $tmp);       
+        printf("[008] Expecting boolean/false, got %s/%s\n", gettype($tmp), $tmp);
     
     print "done!\n";  
 ?>

Thread
PHP mysqlnd svn commit: r174 - trunk/ext/mysqli/testsuwendel16 Mar