summaryrefslogtreecommitdiff
path: root/ext/oci8
diff options
context:
space:
mode:
authorChristopher Jones <sixd@php.net>2008-06-05 23:27:41 +0000
committerChristopher Jones <sixd@php.net>2008-06-05 23:27:41 +0000
commit307edab6ee3c98091b21ce7a7caa2447dff9ff9c (patch)
tree7a98ceec996da7261f3bd6b0e2224b864d96a367 /ext/oci8
parent579dcade614af6b6c61112d54019b3e84902bb55 (diff)
downloadphp-git-307edab6ee3c98091b21ce7a7caa2447dff9ff9c.tar.gz
Make tests interruptible; clean up tables at start
Diffstat (limited to 'ext/oci8')
-rw-r--r--ext/oci8/tests/define2.phpt13
-rw-r--r--ext/oci8/tests/define3.phpt15
2 files changed, 21 insertions, 7 deletions
diff --git a/ext/oci8/tests/define2.phpt b/ext/oci8/tests/define2.phpt
index 7b1965b4a1..f841efad04 100644
--- a/ext/oci8/tests/define2.phpt
+++ b/ext/oci8/tests/define2.phpt
@@ -5,10 +5,17 @@ Test oci_define_by_name types
--FILE--
<?php
-require dirname(__FILE__)."/connect.inc";
+require(dirname(__FILE__)."/connect.inc");
-$stmt = oci_parse($c, "create table phptestrawtable( id number(10), fileimage raw(1000))");
-oci_execute($stmt);
+$stmtarray = array(
+ "drop table phptestrawtable",
+ "create table phptestrawtable( id number(10), fileimage raw(1000))"
+);
+
+foreach ($stmtarray as $stmt) {
+ $s = oci_parse($c, $stmt);
+ @oci_execute($s);
+}
$stmt = oci_parse ($c, "insert into phptestrawtable (id, fileimage) values (:id, :fileimage)");
$i=1;
diff --git a/ext/oci8/tests/define3.phpt b/ext/oci8/tests/define3.phpt
index ac8be464fa..7766b7c540 100644
--- a/ext/oci8/tests/define3.phpt
+++ b/ext/oci8/tests/define3.phpt
@@ -5,10 +5,17 @@ Test oci_define_by_name() LOB descriptor
--FILE--
<?php
-require dirname(__FILE__)."/connect.inc";
-
-$stmt = oci_parse($c, "create table phpdefblobtable( id number(10), fileimage blob)");
-oci_execute($stmt);
+require(dirname(__FILE__)."/connect.inc");
+
+$stmtarray = array(
+ "drop table phpdefblobtable",
+ "create table phpdefblobtable (id number(10), fileimage blob)"
+);
+
+foreach ($stmtarray as $stmt) {
+ $s = oci_parse($c, $stmt);
+ @oci_execute($s);
+}
// Load data
$stmt = oci_parse ($c, "insert into phpdefblobtable (id, fileimage) values (:id, empty_blob()) returning fileimage into :fileimage");