Make tests interruptible; clean up tables at start

This commit is contained in:
Christopher Jones 2008-06-05 23:27:41 +00:00
parent 579dcade61
commit 307edab6ee
2 changed files with 20 additions and 6 deletions

View file

@ -5,10 +5,17 @@ Test oci_define_by_name types
--FILE-- --FILE--
<?php <?php
require dirname(__FILE__)."/connect.inc"; require(dirname(__FILE__)."/connect.inc");
$stmt = oci_parse($c, "create table phptestrawtable( id number(10), fileimage raw(1000))"); $stmtarray = array(
oci_execute($stmt); "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)"); $stmt = oci_parse ($c, "insert into phptestrawtable (id, fileimage) values (:id, :fileimage)");
$i=1; $i=1;

View file

@ -5,10 +5,17 @@ Test oci_define_by_name() LOB descriptor
--FILE-- --FILE--
<?php <?php
require dirname(__FILE__)."/connect.inc"; require(dirname(__FILE__)."/connect.inc");
$stmt = oci_parse($c, "create table phpdefblobtable( id number(10), fileimage blob)"); $stmtarray = array(
oci_execute($stmt); "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 // Load data
$stmt = oci_parse ($c, "insert into phpdefblobtable (id, fileimage) values (:id, empty_blob()) returning fileimage into :fileimage"); $stmt = oci_parse ($c, "insert into phpdefblobtable (id, fileimage) values (:id, empty_blob()) returning fileimage into :fileimage");