Patch pdo_firebird_test_fixes for PDO Firebird Bug #55663
Patch version 2011-09-10 08:13 UTC
Return to Bug #55663 |
Download this patch
Patch Revisions:
Developer: lester@lsces.co.uk
# HG changeset patch
# User Lester Caine <lester@lsces.co.uk>
# Date 1315641083 -3600
# Branch PHP_5_3
# Node ID 73985ec4b6723b840f269b786e35e0ec09a7dbb0
# Parent 84d8328354dee40c29bf33836e0a94b2944c32cf
Modify pdo tests to hide failures in the pdo_firebird versions
diff -r 84d8328354de -r 73985ec4b672 ext/pdo/tests/bug_34630.phpt
--- a/ext/pdo/tests/bug_34630.phpt Fri Sep 09 21:23:06 2011 +0100
+++ b/ext/pdo/tests/bug_34630.phpt Sat Sep 10 08:51:23 2011 +0100
@@ -6,6 +6,7 @@
$dir = getenv('REDIR_TEST_DIR');
if (false == $dir) die('skip no driver');
require_once $dir . 'pdo_test.inc';
+if (!strncasecmp(getenv('PDOTEST_DSN'), 'firebird', strlen('firebird'))) die('skip not relevant for pdo_firebird driver - does not support named parameters in this context');
PDOTest::skip();
?>
--FILE--
@@ -16,9 +17,12 @@
$driver = $db->getAttribute(PDO::ATTR_DRIVER_NAME);
$is_oci = $driver == 'oci';
+$is_firebird = $driver == 'firebird';
if ($is_oci) {
$db->exec('CREATE TABLE test (id int NOT NULL PRIMARY KEY, val BLOB)');
+} else if ($is_firebird) {
+ $db->exec('CREATE TABLE test (id int NOT NULL PRIMARY KEY, val BLOB SUB_TYPE TEXT)');
} else {
$db->exec('CREATE TABLE test (id int NOT NULL PRIMARY KEY, val VARCHAR(256))');
}
diff -r 84d8328354de -r 73985ec4b672 ext/pdo/tests/bug_35671.phpt
--- a/ext/pdo/tests/bug_35671.phpt Fri Sep 09 21:23:06 2011 +0100
+++ b/ext/pdo/tests/bug_35671.phpt Sat Sep 10 08:51:23 2011 +0100
@@ -6,6 +6,7 @@
$dir = getenv('REDIR_TEST_DIR');
if (false == $dir) die('skip no driver');
require_once $dir . 'pdo_test.inc';
+if (!strncasecmp(getenv('PDOTEST_DSN'), 'firebird', strlen('firebird'))) die('skip not relevant for pdo_firebird driver - does not support named parameters in this context');
PDOTest::skip();
?>
--FILE--
diff -r 84d8328354de -r 73985ec4b672 ext/pdo/tests/bug_36798.phpt
--- a/ext/pdo/tests/bug_36798.phpt Fri Sep 09 21:23:06 2011 +0100
+++ b/ext/pdo/tests/bug_36798.phpt Sat Sep 10 08:51:23 2011 +0100
@@ -6,11 +6,11 @@
$dir = getenv('REDIR_TEST_DIR');
if (false == $dir) die('skip no driver');
require_once $dir . 'pdo_test.inc';
+if (!strncasecmp(getenv('PDOTEST_DSN'), 'firebird', strlen('firebird'))) die('skip not relevant for pdo_firebird driver - SQL is not valid against SQL standard');
PDOTest::skip();
if (!strncasecmp(getenv('PDOTEST_DSN'), 'oci', strlen('oci'))){
if (!strpos(strtolower(getenv('PDOTEST_DSN')), 'charset=we8mswin1252')) die('skip expected output valid for Oracle with WE8MSWIN1252 character set');
-
}
?>
diff -r 84d8328354de -r 73985ec4b672 ext/pdo/tests/bug_38253.phpt
--- a/ext/pdo/tests/bug_38253.phpt Fri Sep 09 21:23:06 2011 +0100
+++ b/ext/pdo/tests/bug_38253.phpt Sat Sep 10 08:51:23 2011 +0100
@@ -6,6 +6,7 @@
$dir = getenv('REDIR_TEST_DIR');
if (false == $dir) die('skip no driver');
require_once $dir . 'pdo_test.inc';
+if (!strncasecmp(getenv('PDOTEST_DSN'), 'firebird', strlen('firebird'))) die('skip pdo_firebird driver failure to be identified in PDO::ATTR_DEFAULT_FETCH_MODE');
PDOTest::skip();
?>
--FILE--
@@ -26,6 +27,8 @@
if ($pdo->getAttribute(PDO::ATTR_DRIVER_NAME) == 'oci') {
$type = "clob";
+} else if ($pdo->getAttribute(PDO::ATTR_DRIVER_NAME) == 'firebird') {
+ $type = "BLOB SUB_TYPE TEXT";
} else{
$type = "text";
}
diff -r 84d8328354de -r 73985ec4b672 ext/pdo/tests/bug_38394.phpt
--- a/ext/pdo/tests/bug_38394.phpt Fri Sep 09 21:23:06 2011 +0100
+++ b/ext/pdo/tests/bug_38394.phpt Sat Sep 10 08:51:23 2011 +0100
@@ -7,6 +7,7 @@
if (false == $dir) die('skip no driver');
if (!strncasecmp(getenv('PDOTEST_DSN'), 'sqlite2', strlen('sqlite2'))) die('skip not relevant for pdo_sqlite2 driver');
require_once $dir . 'pdo_test.inc';
+if (!strncasecmp(getenv('PDOTEST_DSN'), 'firebird', strlen('firebird'))) die('skip not relevant for pdo_firebird driver - does not support named parameters in this context');
PDOTest::skip();
?>
--FILE--
diff -r 84d8328354de -r 73985ec4b672 ext/pdo/tests/bug_39398.phpt
--- a/ext/pdo/tests/bug_39398.phpt Fri Sep 09 21:23:06 2011 +0100
+++ b/ext/pdo/tests/bug_39398.phpt Sat Sep 10 08:51:23 2011 +0100
@@ -6,6 +6,7 @@
$dir = getenv('REDIR_TEST_DIR');
if (false == $dir) die('skip no driver');
require_once $dir . 'pdo_test.inc';
+if (!strncasecmp(getenv('PDOTEST_DSN'), 'firebird', strlen('firebird'))) die('skip not relevant for pdo_firebird driver - does not support named parameters in this context');
PDOTest::skip();
?>
--FILE--
diff -r 84d8328354de -r 73985ec4b672 ext/pdo/tests/bug_43130.phpt
--- a/ext/pdo/tests/bug_43130.phpt Fri Sep 09 21:23:06 2011 +0100
+++ b/ext/pdo/tests/bug_43130.phpt Sat Sep 10 08:51:23 2011 +0100
@@ -8,6 +8,7 @@
if (!strncasecmp(getenv('PDOTEST_DSN'), 'sqlite', strlen('sqlite'))) die('skip not relevant for sqlite driver');
if (!strncasecmp(getenv('PDOTEST_DSN'), 'pgsql', strlen('pgsql'))) die('skip not relevant for pgsql driver');
if (!strncasecmp(getenv('PDOTEST_DSN'), 'oci', strlen('oci'))) die('skip not relevant for oci driver - Hyphen is not legal for bind names in Oracle DB');
+if (!strncasecmp(getenv('PDOTEST_DSN'), 'firebird', strlen('firebird'))) die('skip not relevant for pdo_firebird driver - does not support named parameters in this context');
require_once $dir . 'pdo_test.inc';
PDOTest::skip();
?>
diff -r 84d8328354de -r 73985ec4b672 ext/pdo/tests/bug_43139.phpt
--- a/ext/pdo/tests/bug_43139.phpt Fri Sep 09 21:23:06 2011 +0100
+++ b/ext/pdo/tests/bug_43139.phpt Sat Sep 10 08:51:23 2011 +0100
@@ -20,6 +20,8 @@
$from = '';
if ($db->getAttribute(PDO::ATTR_DRIVER_NAME) == 'oci') {
$from = 'from dual';
+} else if ($db->getAttribute(PDO::ATTR_DRIVER_NAME) == 'firebird') {
+ $from = 'FROM RDB$DATABASE';
}
var_dump($db->query("select 0 as abc, 1 as xyz, 2 as def $from")->fetchAll(PDO::FETCH_GROUP));
diff -r 84d8328354de -r 73985ec4b672 ext/pdo/tests/pdo_016.phpt
--- a/ext/pdo/tests/pdo_016.phpt Fri Sep 09 21:23:06 2011 +0100
+++ b/ext/pdo/tests/pdo_016.phpt Sat Sep 10 08:51:23 2011 +0100
@@ -6,6 +6,7 @@
$dir = getenv('REDIR_TEST_DIR');
if (false == $dir) die('skip no driver');
if (!strncasecmp(getenv('PDOTEST_DSN'), 'oci', strlen('oci'))) die('skip not relevant for oci driver - cannot reexecute after closing cursors without reparse');
+if (!strncasecmp(getenv('PDOTEST_DSN'), 'firebird', strlen('firebird'))) die('skip not relevant for pdo_firebird driver - does not support named parameters in this context');
require_once $dir . 'pdo_test.inc';
PDOTest::skip();
?>
diff -r 84d8328354de -r 73985ec4b672 ext/pdo/tests/pdo_016a.phpt
--- a/ext/pdo/tests/pdo_016a.phpt Fri Sep 09 21:23:06 2011 +0100
+++ b/ext/pdo/tests/pdo_016a.phpt Sat Sep 10 08:51:23 2011 +0100
@@ -7,6 +7,7 @@
if (false == $dir) die('skip no driver');
require_once $dir . 'pdo_test.inc';
if (!strncasecmp(getenv('PDOTEST_DSN'), 'oci', strlen('oci'))) die('skip not relevant for oci driver - cannot reexecute after closing cursors without reparse');
+if (!strncasecmp(getenv('PDOTEST_DSN'), 'firebird', strlen('firebird'))) die('skip not relevant for pdo_firebird driver - does not support named parameters in this context');
PDOTest::skip();
?>
--FILE--
diff -r 84d8328354de -r 73985ec4b672 ext/pdo/tests/pdo_017.phpt
--- a/ext/pdo/tests/pdo_017.phpt Fri Sep 09 21:23:06 2011 +0100
+++ b/ext/pdo/tests/pdo_017.phpt Sat Sep 10 08:51:23 2011 +0100
@@ -14,6 +14,7 @@
} catch (PDOException $e) {
die('skip no working transactions: ' . $e->getMessage());
}
+$db->rollBack();
if ($db->getAttribute(PDO::ATTR_DRIVER_NAME) == 'mysql') {
require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc');
diff -r 84d8328354de -r 73985ec4b672 ext/pdo/tests/pdo_018.phpt
--- a/ext/pdo/tests/pdo_018.phpt Fri Sep 09 21:23:06 2011 +0100
+++ b/ext/pdo/tests/pdo_018.phpt Sat Sep 10 08:51:23 2011 +0100
@@ -7,6 +7,7 @@
$dir = getenv('REDIR_TEST_DIR');
if (false == $dir) die('skip no driver');
require_once $dir . 'pdo_test.inc';
+if (!strncasecmp(getenv('PDOTEST_DSN'), 'firebird', strlen('firebird'))) die('skip not relevant for pdo_firebird driver - does not support named parameters in this context');
PDOTest::skip();
?>
--FILE--
diff -r 84d8328354de -r 73985ec4b672 ext/pdo/tests/pdo_021.phpt
--- a/ext/pdo/tests/pdo_021.phpt Fri Sep 09 21:23:06 2011 +0100
+++ b/ext/pdo/tests/pdo_021.phpt Sat Sep 10 08:51:23 2011 +0100
@@ -6,6 +6,7 @@
$dir = getenv('REDIR_TEST_DIR');
if (false == $dir) die('skip no driver');
require_once $dir . 'pdo_test.inc';
+if (!strncasecmp(getenv('PDOTEST_DSN'), 'firebird', strlen('firebird'))) die('skip not relevant for pdo_firebird driver - does not support named parameters in this context');
PDOTest::skip();
?>
--FILE--
diff -r 84d8328354de -r 73985ec4b672 ext/pdo/tests/pdo_024.phpt
--- a/ext/pdo/tests/pdo_024.phpt Fri Sep 09 21:23:06 2011 +0100
+++ b/ext/pdo/tests/pdo_024.phpt Sat Sep 10 08:51:23 2011 +0100
@@ -6,6 +6,7 @@
$dir = getenv('REDIR_TEST_DIR');
if (false == $dir) die('skip no driver');
require_once $dir . 'pdo_test.inc';
+if (!strncasecmp(getenv('PDOTEST_DSN'), 'firebird', strlen('firebird'))) die('skip not relevant for pdo_firebird driver - does not support named parameters in this context');
PDOTest::skip();
?>
--FILE--
|