From: Felipe Pena Date: Sat, 4 Dec 2010 12:28:23 +0000 (+0000) Subject: - Fixed tests X-Git-Tag: php-5.3.4~12 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=0f53b4e515415391a555208f1458464b709e8f40;p=php - Fixed tests --- 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