mirror of
https://github.com/php/php-src.git
synced 2025-01-22 11:44:09 +08:00
- Fixed tests
This commit is contained in:
parent
11a3a52fc8
commit
57fc653c05
@ -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);
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user