Annotation of embedaddon/php/ext/pgsql/tests/02connection.phpt, revision 1.1
1.1 ! misho 1: --TEST--
! 2: PostgreSQL connection
! 3: --SKIPIF--
! 4: <?php include("skipif.inc"); ?>
! 5: --FILE--
! 6: <?php
! 7: // connection function tests
! 8:
! 9: include('config.inc');
! 10:
! 11: $db = pg_pconnect($conn_str);
! 12: var_dump($db);
! 13:
! 14: if (pg_connection_status($db) != PGSQL_CONNECTION_OK)
! 15: {
! 16: echo "pg_connection_status() error\n";
! 17: }
! 18: if (!pg_connection_reset($db))
! 19: {
! 20: echo "pg_connection_reset() error\n";
! 21: }
! 22: if (pg_connection_busy($db))
! 23: {
! 24: echo "pg_connection_busy() error\n";
! 25: }
! 26: if (function_exists('pg_transaction_status')) {
! 27: if (pg_transaction_status($db) != PGSQL_TRANSACTION_IDLE)
! 28: {
! 29: echo "pg_transaction_status() error\n";
! 30: }
! 31: }
! 32: if (false === pg_host($db))
! 33: {
! 34: echo "pg_host() error\n";
! 35: }
! 36: if (!pg_dbname($db))
! 37: {
! 38: echo "pg_dbname() error\n";
! 39: }
! 40: if (!pg_port($db))
! 41: {
! 42: echo "pg_port() error\n";
! 43: }
! 44: if (pg_tty($db))
! 45: {
! 46: echo "pg_tty() error\n";
! 47: }
! 48: if (pg_options($db))
! 49: {
! 50: echo "pg_options() error\n";
! 51: }
! 52:
! 53: pg_close($db);
! 54:
! 55: ?>
! 56: ===DONE===
! 57: --EXPECTF--
! 58: resource(%d) of type (pgsql link%s)
! 59: ===DONE===
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>