summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFelipe Pena <felipe@php.net>2010-12-04 12:28:23 +0000
committerFelipe Pena <felipe@php.net>2010-12-04 12:28:23 +0000
commit57fc653c0566a39c417a56a239805689553b36d9 (patch)
tree453c3d026ca7b453d20ecb6662c7a1071327e626
parent11a3a52fc8e0483a0676cb29b81eb499301fc7a0 (diff)
downloadphp-git-57fc653c0566a39c417a56a239805689553b36d9.tar.gz
- Fixed tests
-rw-r--r--ext/pdo/tests/bug_38253.phpt8
-rw-r--r--ext/pdo/tests/pdo_018.phpt8
2 files changed, 14 insertions, 2 deletions
diff --git a/ext/pdo/tests/bug_38253.phpt b/ext/pdo/tests/bug_38253.phpt
index ba937a052a..4453c3bb23 100644
--- a/ext/pdo/tests/bug_38253.phpt
+++ b/ext/pdo/tests/bug_38253.phpt
@@ -24,7 +24,13 @@ var_dump($stmt->fetchAll());
$pdo = PDOTest::factory();
-$pdo->exec ("create table test2 (id integer primary key, n text)");
+if ($pdo->getAttribute(PDO::ATTR_DRIVER_NAME) == 'oci') {
+ $type = "clob";
+} else{
+ $type = "text";
+}
+
+$pdo->exec ("create table test2 (id integer primary key, n $type)");
$pdo->exec ("INSERT INTO test2 (id, n) VALUES (1,'hi')");
$pdo->setAttribute (PDO::ATTR_DEFAULT_FETCH_MODE, PDO::FETCH_FUNC);
diff --git a/ext/pdo/tests/pdo_018.phpt b/ext/pdo/tests/pdo_018.phpt
index a57c6b7261..7f27ce36e5 100644
--- a/ext/pdo/tests/pdo_018.phpt
+++ b/ext/pdo/tests/pdo_018.phpt
@@ -127,7 +127,13 @@ foreach($objs as $idx => $obj)
unset($stmt);
echo "===DATA===\n";
-var_dump($db->query('SELECT test.val FROM test')->fetchAll(PDO::FETCH_COLUMN));
+$res = $db->query('SELECT test.val FROM test')->fetchAll(PDO::FETCH_COLUMN);
+
+// For Oracle map NULL to empty string so the test doesn't diff
+if ($db->getAttribute(PDO::ATTR_DRIVER_NAME) == 'oci' && $res[0] === null) {
+ $res[0] = "";
+}
+var_dump($res);
echo "===FAILURE===\n";
try