MySQL Lists are EOL. Please join:

List:Commits« Previous MessageNext Message »
From:uwendel Date:January 24 2008 1:11pm
Subject:PHP mysqlnd svn commit: r1211 - trunk/tests/ext/pdo
View as plain text  
Author: uwendel
Date: 2008-01-24 14:11:48 +0100 (Thu, 24 Jan 2008)
New Revision: 1211

Modified:
   trunk/tests/ext/pdo/pdo_get_available_drivers.phpt
Log:
Comparing PDO::getAvailableDrivers() with undocumented pdo_drivers()


Modified: trunk/tests/ext/pdo/pdo_get_available_drivers.phpt
===================================================================
--- trunk/tests/ext/pdo/pdo_get_available_drivers.phpt	2008-01-11 17:07:25 UTC (rev 1210)
+++ trunk/tests/ext/pdo/pdo_get_available_drivers.phpt	2008-01-24 13:11:48 UTC (rev 1211)
@@ -45,6 +45,25 @@
 			var_dump($tmp);
 		}
 
+		/* undocumented, from pdo.c */
+		$tmp2 = pdo_drivers();
+		array_flip($tmp2);
+		foreach ($tmp as $k => $driver)
+			if (isset($tmp2[$driver])) {
+				unset($tmp2[$driver]);
+				unset($tmp[$k]);
+			}
+
+		if (!empty($tmp)) {
+			printf("[006] Dumping list of drivers returned by PDO::getAvailableDrivers() but not
returned by pdo_drivers()\n");
+			var_dump($tmp);
+		}
+
+	if (!empty($tmp2)) {
+			printf("[007] Dumping list of drivers returned by pdo_drivers() but not returned by
PDO::getAvailableDrivers()\n");
+			var_dump($tmp2);
+		}
+
 	}
 
 	/*
@@ -54,10 +73,10 @@
 	// Fatal error
 	$tmp = $db->getAvailableDrivers();
 	if (is_array($tmp))
-		printf("[006] This is not a static method, change the manual or the
implementation!\n");
+		printf("[008] This is not a static method, change the manual or the
implementation!\n");
 
 } catch (PDOException $e) {
-	printf("[007] %s, [%s] %s\n",
+	printf("[009] %s, [%s] %s\n",
 		$e->getMessage(), $db->errorCode(), implode(' ', $db->errorInfo()));
 }
 

Thread
PHP mysqlnd svn commit: r1211 - trunk/tests/ext/pdouwendel24 Jan