summaryrefslogtreecommitdiff
path: root/ext/oci8/tests/define2.phpt
diff options
context:
space:
mode:
authorChristopher Jones <sixd@php.net>2011-06-10 19:16:35 +0000
committerChristopher Jones <sixd@php.net>2011-06-10 19:16:35 +0000
commit1c35a1926b8bf61c5e00b12d237b90d412a54daf (patch)
tree418eedf5302e83b593f47e6ad97565304458078a /ext/oci8/tests/define2.phpt
parent16b744d2d4d9dd66edb4248cfc30b70eea85809a (diff)
downloadphp-git-1c35a1926b8bf61c5e00b12d237b90d412a54daf.tar.gz
Add new OCI8 tests. Refactor skipifs. Sync 5.3/5.4/trunk branches
Diffstat (limited to 'ext/oci8/tests/define2.phpt')
-rw-r--r--ext/oci8/tests/define2.phpt19
1 files changed, 12 insertions, 7 deletions
diff --git a/ext/oci8/tests/define2.phpt b/ext/oci8/tests/define2.phpt
index 46e11bf886..c53bebd2e1 100644
--- a/ext/oci8/tests/define2.phpt
+++ b/ext/oci8/tests/define2.phpt
@@ -1,7 +1,10 @@
--TEST--
Test oci_define_by_name types
--SKIPIF--
-<?php if (!extension_loaded('oci8')) die("skip no oci8 extension"); ?>
+<?php
+$target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on these DBs
+require(dirname(__FILE__).'/skipif.inc');
+?>
--FILE--
<?php
@@ -12,10 +15,7 @@ $stmtarray = array(
"create table phptestrawtable( id number(10), fileimage raw(1000))"
);
-foreach ($stmtarray as $stmt) {
- $s = oci_parse($c, $stmt);
- @oci_execute($s);
-}
+oci8_test_sql_execute($c, $stmtarray);
$stmt = oci_parse ($c, "insert into phptestrawtable (id, fileimage) values (:id, :fileimage)");
$i=1;
@@ -68,8 +68,13 @@ while (oci_fetch($stmt)) {
echo "file md5:" . md5($fi) . "\n";
}
-$stmt = oci_parse($c, "drop table phptestrawtable");
-oci_execute($stmt);
+// Cleanup
+
+$stmtarray = array(
+ "drop table phptestrawtable"
+);
+
+oci8_test_sql_execute($c, $stmtarray);
echo "Done\n";
?>