af9dc8
From c08e1d2be948d63f7a9309344a0ed4092ac8dace Mon Sep 17 00:00:00 2001
af9dc8
From: Nikita Popov <nikic@php.net>
af9dc8
Date: Sun, 24 Mar 2013 17:52:16 +0100
af9dc8
Subject: [PATCH] Fix PDO::inTransaction() test for pgsql
af9dc8
af9dc8
inTransaction() nowadays casts the in_transaction result to boolean.
af9dc8
I'm not sure whether the INERROR state should result in true or false.
af9dc8
For now I went with the result that we actually get.
af9dc8
---
af9dc8
 ext/pdo_pgsql/tests/is_in_transaction.phpt | 8 ++++----
af9dc8
 1 file changed, 4 insertions(+), 4 deletions(-)
af9dc8
af9dc8
diff --git a/ext/pdo_pgsql/tests/is_in_transaction.phpt b/ext/pdo_pgsql/tests/is_in_transaction.phpt
af9dc8
index 99ff561..72da4f4 100644
af9dc8
--- a/ext/pdo_pgsql/tests/is_in_transaction.phpt
af9dc8
+++ b/ext/pdo_pgsql/tests/is_in_transaction.phpt
af9dc8
@@ -57,10 +57,10 @@ var_dump($db->inTransaction());
af9dc8
 ?>
af9dc8
 --EXPECT--
af9dc8
 Test PDO::PGSQL_TRANSACTION_INTRANS
af9dc8
-int(2)
af9dc8
+bool(true)
af9dc8
 Test PDO::PGSQL_TRANSACTION_IDLE
af9dc8
-int(0)
af9dc8
+bool(false)
af9dc8
 Test PDO::PGSQL_TRANSACTION_INERROR
af9dc8
-int(3)
af9dc8
+bool(true)
af9dc8
 Test PDO::PGSQL_TRANSACTION_IDLE
af9dc8
-int(0)
af9dc8
+bool(false)
af9dc8
-- 
af9dc8
1.7.11.5
af9dc8