felipe Sat, 04 Dec 2010 12:28:23 +0000 Revision: http://svn.php.net/viewvc?view=revision&revision=305961
Log: - Fixed tests Changed paths: U php/php-src/branches/PHP_5_3/ext/pdo/tests/bug_38253.phpt U php/php-src/branches/PHP_5_3/ext/pdo/tests/pdo_018.phpt U php/php-src/trunk/ext/pdo/tests/bug_38253.phpt U php/php-src/trunk/ext/pdo/tests/pdo_018.phpt Modified: php/php-src/branches/PHP_5_3/ext/pdo/tests/bug_38253.phpt =================================================================== --- php/php-src/branches/PHP_5_3/ext/pdo/tests/bug_38253.phpt 2010-12-04 07:05:27 UTC (rev 305960) +++ php/php-src/branches/PHP_5_3/ext/pdo/tests/bug_38253.phpt 2010-12-04 12:28:23 UTC (rev 305961) @@ -24,7 +24,13 @@ $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); Modified: php/php-src/branches/PHP_5_3/ext/pdo/tests/pdo_018.phpt =================================================================== --- php/php-src/branches/PHP_5_3/ext/pdo/tests/pdo_018.phpt 2010-12-04 07:05:27 UTC (rev 305960) +++ php/php-src/branches/PHP_5_3/ext/pdo/tests/pdo_018.phpt 2010-12-04 12:28:23 UTC (rev 305961) @@ -127,8 +127,14 @@ 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 { Modified: php/php-src/trunk/ext/pdo/tests/bug_38253.phpt =================================================================== --- php/php-src/trunk/ext/pdo/tests/bug_38253.phpt 2010-12-04 07:05:27 UTC (rev 305960) +++ php/php-src/trunk/ext/pdo/tests/bug_38253.phpt 2010-12-04 12:28:23 UTC (rev 305961) @@ -24,7 +24,13 @@ $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); Modified: php/php-src/trunk/ext/pdo/tests/pdo_018.phpt =================================================================== --- php/php-src/trunk/ext/pdo/tests/pdo_018.phpt 2010-12-04 07:05:27 UTC (rev 305960) +++ php/php-src/trunk/ext/pdo/tests/pdo_018.phpt 2010-12-04 12:28:23 UTC (rev 305961) @@ -127,8 +127,14 @@ 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 {
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php