summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYasuo Ohgaki <yohgaki@php.net>2001-12-17 02:09:07 +0000
committerYasuo Ohgaki <yohgaki@php.net>2001-12-17 02:09:07 +0000
commit0f12a9ca33e5819982fa6980e9e8e3f4074b4e82 (patch)
tree046a4665556f9fbbc53803efded8dabc3237138d
parent8442ce9d9fbd114f74a3b659d8f35b5fab5490a8 (diff)
downloadphp-git-0f12a9ca33e5819982fa6980e9e8e3f4074b4e82.tar.gz
Use database named test for testing
-rw-r--r--ext/pgsql/tests/config.inc2
-rw-r--r--ext/pgsql/tests/skipif.inc5
2 files changed, 5 insertions, 2 deletions
diff --git a/ext/pgsql/tests/config.inc b/ext/pgsql/tests/config.inc
index c31c1cadc4..a836d556dd 100644
--- a/ext/pgsql/tests/config.inc
+++ b/ext/pgsql/tests/config.inc
@@ -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
diff --git a/ext/pgsql/tests/skipif.inc b/ext/pgsql/tests/skipif.inc
index d1b075e3ed..34e93b2aaa 100644
--- a/ext/pgsql/tests/skipif.inc
+++ b/ext/pgsql/tests/skipif.inc
@@ -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") && ini_get("enable_dl")) {
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");
}