summaryrefslogtreecommitdiff
path: root/ext/pgsql/tests/connection.inc
diff options
context:
space:
mode:
Diffstat (limited to 'ext/pgsql/tests/connection.inc')
-rw-r--r--ext/pgsql/tests/connection.inc44
1 files changed, 44 insertions, 0 deletions
diff --git a/ext/pgsql/tests/connection.inc b/ext/pgsql/tests/connection.inc
new file mode 100644
index 0000000000..e6e9c143af
--- /dev/null
+++ b/ext/pgsql/tests/connection.inc
@@ -0,0 +1,44 @@
+<?php
+// connection function tests
+
+include('config.inc');
+
+$db = pg_pconnect($conn_str);
+if (pg_connection_status($db) != PGSQL_CONNECTION_OK)
+{
+ echo "pg_connection_status() error\n";
+}
+if (!pg_connection_reset($db))
+{
+ echo "pg_connection_reset() error\n";
+}
+if (pg_connection_busy($db))
+{
+ echo "pg_connection_busy() error\n";
+}
+if (!pg_host($db))
+{
+ echo "pg_host() error\n";
+}
+if (!pg_dbname($db))
+{
+ echo "pg_dbname() error\n";
+}
+if (!pg_port($db))
+{
+ echo "pg_port() error\n";
+}
+if (pg_tty($db))
+{
+ echo "pg_tty() error\n";
+}
+if (pg_options($db))
+{
+ echo "pg_options() error\n";
+}
+
+pg_close($db);
+
+echo "OK";
+
+?> \ No newline at end of file