cvs: pear /MDB/tests clitest.php test.php
| From: | Paul Gregory Cooper | Date: | Tue, 03 Dec 2002 11:36:45 +0000 |
| Subject: | cvs: pear /MDB/tests clitest.php test.php | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-7730@lists.php.net to get a copy of this message | ||
pgc Tue Dec 3 06:36:45 2002 EDT
Modified files:
/pear/MDB/tests test.php clitest.php
Log:
fix to make sure the database name get's pickedup. was causing errors
in manager when trying to create tables.
Index: pear/MDB/tests/test.php
diff -u pear/MDB/tests/test.php:1.13 pear/MDB/tests/test.php:1.14
--- pear/MDB/tests/test.php:1.13 Mon Nov 25 19:07:32 2002
+++ pear/MDB/tests/test.php Tue Dec 3 06:36:45 2002
@@ -41,7 +41,7 @@
// | Author: Paul Cooper <pgc@ucecom.com> |
// +----------------------------------------------------------------------+
//
-// $Id: test.php,v 1.13 2002/11/26 00:07:32 lsmith Exp $
+// $Id: test.php,v 1.14 2002/12/03 11:36:45 pgc Exp $
/*
This is a small test suite for MDB using PHPUnit
@@ -83,6 +83,10 @@
foreach ($dbarray as $db) {
$dsn = $db['dsn'];
+ // if the database name isn't set in the dsn use the default
+ if (empty($dsn['database']) {
+ $dsn['database'] = $database;
+ }
$options = $db['options'];
foreach ($testcases as $testcase) {
Index: pear/MDB/tests/clitest.php
diff -u pear/MDB/tests/clitest.php:1.3 pear/MDB/tests/clitest.php:1.4
--- pear/MDB/tests/clitest.php:1.3 Mon Nov 25 19:07:33 2002
+++ pear/MDB/tests/clitest.php Tue Dec 3 06:36:45 2002
@@ -104,6 +104,10 @@
foreach ($dbarray as $db) {
$dsn = $db['dsn'];
+ // if the database name isn't set in the dsn use the default
+ if (empty($dsn['database']) {
+ $dsn['database'] = $database;
+ }
$options = $db['options'];
foreach ($testcases as $testcase) {