cvs: php4 /ext/pgsql/tests config.inc skipif.inc
| From: | Yasuo Ohgaki | Date: | Mon, 17 Dec 2001 02:09:08 +0000 |
| Subject: | cvs: php4 /ext/pgsql/tests config.inc skipif.inc | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-8691@lists.php.net to get a copy of this message | ||
yohgaki Sun Dec 16 21:09:08 2001 EDT
Modified files:
/php4/ext/pgsql/tests config.inc skipif.inc
Log:
Use database named test for testing
Index: php4/ext/pgsql/tests/config.inc
diff -u php4/ext/pgsql/tests/config.inc:1.1 php4/ext/pgsql/tests/config.inc:1.2
--- php4/ext/pgsql/tests/config.inc:1.1 Sun Dec 16 19:16:48 2001
+++ php4/ext/pgsql/tests/config.inc Sun Dec 16 21:09:07 2001
@@ -2,7 +2,7 @@
// These vars are used to connect db and create test table.
// values can be set to meet your environment
-$conn_str = "host=localhost"; // connection string
+$conn_str = "host=localhost dbname=test"; // connection string
$table_name = "php_pgsql_test"; // test table that should be exist
$num_test_record = 1000; // Number of records to create
Index: php4/ext/pgsql/tests/skipif.inc
diff -u php4/ext/pgsql/tests/skipif.inc:1.1 php4/ext/pgsql/tests/skipif.inc:1.2
--- php4/ext/pgsql/tests/skipif.inc:1.1 Sun Dec 16 19:16:48 2001
+++ php4/ext/pgsql/tests/skipif.inc Sun Dec 16 21:09:07 2001
@@ -5,6 +5,9 @@
// with no username/password, AND
// * we have create/drop privileges on the entire "test"
// database
+
+include("config.inc");
+
if (!extension_loaded("pgsql") && ini_get("enable_dl")) {
$dlext = (substr(PHP_OS, 0, 3) == "WIN") ? ".dll" : ".so";
@dl("pgsql$dlext");
@@ -12,7 +15,7 @@
if (!extension_loaded("pgsql")) {
die("skip\n");
}
-$conn = @pg_connect("host=localhost dbname=test");
+$conn = @pg_connect($conn_str);
if (!is_resource($conn)) {
die("skip\n");
}