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

index 7b1965b4a111228d2766da0c7da7676fecdc3993..f841efad04e6e9fc27150cd2b7c844bb70125914 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 ac8be464fa38c8ee05c0406ca6fa87aee7ffaa77..7766b7c540855615dfeac9c6b6fc9561296d58aa 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");