MySQL Lists are EOL. Please join:

List:Commits« Previous MessageNext Message »
From:uwendel Date:February 19 2008 3:16pm
Subject:PHP mysqlnd svn commit: r1290 - trunk/tests/ext/pdo
View as plain text  
Author: uwendel
Date: 2008-02-19 16:16:30 +0100 (Tue, 19 Feb 2008)
New Revision: 1290

Modified:
   trunk/tests/ext/pdo/pdo_query_fetch_column.phpt
Log:
Fixing test. PHP will cast array() to 0.


Modified: trunk/tests/ext/pdo/pdo_query_fetch_column.phpt
===================================================================
--- trunk/tests/ext/pdo/pdo_query_fetch_column.phpt	2008-02-19 13:35:46 UTC (rev 1289)
+++ trunk/tests/ext/pdo/pdo_query_fetch_column.phpt	2008-02-19 15:16:30 UTC (rev 1290)
@@ -39,8 +39,8 @@
 			var_export($stmt, true), gettype($stmt));
 
 	$stmt = @$db->query($select, PDO::FETCH_COLUMN, array());
-	if (false !== $stmt)
-		printf("[004] Expecting false/boolean because of invalid column offset got %s/%s\n",
+	if (!is_object($stmt) || ('PDOStatement' != get_class($stmt)))
+		printf("[004] Expecting object/PDOStatement because array() will be casted to 0 got,
%s/%s\n",
 			var_export($stmt, true), gettype($stmt));
 
 	$stmt = $db->query($select, PDO::FETCH_COLUMN, 1);
@@ -77,9 +77,6 @@
 [003] Expecting false/boolean because of invalid column offset got
PDOStatement::__set_state(array(
    'queryString' => 'SELECT id, val, grp FROM test ORDER BY id ASC',
 ))/object
-[004] Expecting false/boolean because of invalid column offset got
PDOStatement::__set_state(array(
-   'queryString' => 'SELECT id, val, grp FROM test ORDER BY id ASC',
-))/object
 array(2) {
   [0]=>
   string(1) "A"

Thread
PHP mysqlnd svn commit: r1290 - trunk/tests/ext/pdouwendel19 Feb