Skip to content

Commit 57fc653

Browse files
committed
- Fixed tests
1 parent 11a3a52 commit 57fc653

File tree

2 files changed

+14
-2
lines changed

2 files changed

+14
-2
lines changed

ext/pdo/tests/bug_38253.phpt

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,13 @@ var_dump($stmt->fetchAll());
2424

2525
$pdo = PDOTest::factory();
2626

27-
$pdo->exec ("create table test2 (id integer primary key, n text)");
27+
if ($pdo->getAttribute(PDO::ATTR_DRIVER_NAME) == 'oci') {
28+
$type = "clob";
29+
} else{
30+
$type = "text";
31+
}
32+
33+
$pdo->exec ("create table test2 (id integer primary key, n $type)");
2834
$pdo->exec ("INSERT INTO test2 (id, n) VALUES (1,'hi')");
2935

3036
$pdo->setAttribute (PDO::ATTR_DEFAULT_FETCH_MODE, PDO::FETCH_FUNC);

ext/pdo/tests/pdo_018.phpt

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,13 @@ foreach($objs as $idx => $obj)
127127
unset($stmt);
128128

129129
echo "===DATA===\n";
130-
var_dump($db->query('SELECT test.val FROM test')->fetchAll(PDO::FETCH_COLUMN));
130+
$res = $db->query('SELECT test.val FROM test')->fetchAll(PDO::FETCH_COLUMN);
131+
132+
// For Oracle map NULL to empty string so the test doesn't diff
133+
if ($db->getAttribute(PDO::ATTR_DRIVER_NAME) == 'oci' && $res[0] === null) {
134+
$res[0] = "";
135+
}
136+
var_dump($res);
131137

132138
echo "===FAILURE===\n";
133139
try

0 commit comments

Comments
 (0)