]> granicus.if.org Git - php/commitdiff
MFH: Make tests interruptible; clean up tables at start
authorChristopher Jones <sixd@php.net>
Thu, 5 Jun 2008 23:28:16 +0000 (23:28 +0000)
committerChristopher Jones <sixd@php.net>
Thu, 5 Jun 2008 23:28:16 +0000 (23:28 +0000)
ext/oci8/tests/define2.phpt
ext/oci8/tests/define3.phpt

index e8c5f8a99a3213511e761153d25d7811fbcf939a..46e11bf8861b958fdac2063caba7c95ee78c257c 100644 (file)
@@ -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;
index d30db637cd74d0d7b566d0b43f724c412b63b5b2..892e8e38098078d0197407337c42cab592773a85 100644 (file)
@@ -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");