cvs: php4 /pear/DB/tests prepexe.inc tableinfo.inc
| From: | Stig Bakken | Date: | Sun, 22 Jul 2001 00:30:17 +0000 |
| Subject: | cvs: php4 /pear/DB/tests prepexe.inc tableinfo.inc | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-310@lists.php.net to get a copy of this message | ||
ssb Sat Jul 21 20:30:17 2001 EDT
Modified files:
/php4/pear/DB/tests prepexe.inc tableinfo.inc
Log:
* fixed some DB tests
Index: php4/pear/DB/tests/prepexe.inc
diff -u php4/pear/DB/tests/prepexe.inc:1.1 php4/pear/DB/tests/prepexe.inc:1.2
--- php4/pear/DB/tests/prepexe.inc:1.1 Wed Dec 6 15:18:41 2000
+++ php4/pear/DB/tests/prepexe.inc Sat Jul 21 20:30:15 2001
@@ -6,7 +6,7 @@
$sth3 = $dbh->prepare("INSERT INTO phptest (a,b,c) VALUES(?,?,&)");
print "sth1,sth2,sth3 created\n";
$tmpfile = tempnam("/tmp", "phptmp");
-register_shutdown_function("shutdown");
+register_shutdown_function("my_shutdown");
$fp = fopen($tmpfile, "w");
fwrite($fp, "opaque\nplaceholder\ntest");
fclose($fp);
@@ -25,7 +25,7 @@
print implode(" - ", $row) . "\n";
}
-function shutdown() {
+function my_shutdown() {
global $tmpfile;
unlink($tmpfile);
}
Index: php4/pear/DB/tests/tableinfo.inc
diff -u php4/pear/DB/tests/tableinfo.inc:1.1 php4/pear/DB/tests/tableinfo.inc:1.2
--- php4/pear/DB/tests/tableinfo.inc:1.1 Sat Mar 24 02:00:45 2001
+++ php4/pear/DB/tests/tableinfo.inc Sat Jul 21 20:30:15 2001
@@ -1,5 +1,8 @@
<?php
+$dbh->setErrorHandling(PEAR_ERROR_RETURN);
+$dbh->query("DROP TABLE phptest_fk");
+
$dbh->setErrorHandling(PEAR_ERROR_DIE);
$dbh->query("INSERT INTO phptest VALUES(1, 'one', 'One',
'2001-02-16')");
$dbh->query("INSERT INTO phptest VALUES(2, 'two', 'Two',
'2001-02-15')");