summaryrefslogtreecommitdiff
path: root/ext/pgsql/tests/02connection.phpt
blob: f1258f6df1375d091ec9c82a98dec2565b7034aa (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
--TEST--
PostgreSQL connection
--SKIPIF--
<?php include("skipif.inc"); ?>
--FILE--
<?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";
?>
--EXPECT--
OK