Download src/php/php-src/ext/pgsql/tests/02connection.phpt from meddyrat/dis-bench: direct link, hf CLI and curl.
- Browser
- Download file 924 Bytes
-
https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/ext/pgsql/tests/02connection.phpt
- Command line
-
hf download hf://datasets/meddyrat/dis-bench/src/php/php-src/ext/pgsql/tests/02connection.phpt
-
curl -L -o 02connection.phpt https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/ext/pgsql/tests/02connection.phpt
924 Bytes
| --TEST-- | |
| PostgreSQL connection | |
| --EXTENSIONS-- | |
| pgsql | |
| --SKIPIF-- | |
| include("inc/skipif.inc"); | |
| --FILE-- | |
| // connection function tests | |
| include('inc/config.inc'); | |
| $db = pg_pconnect($conn_str); | |
| var_dump($db); | |
| 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_transaction_status($db) != PGSQL_TRANSACTION_IDLE) | |
| { | |
| echo "pg_transaction_status() error\n"; | |
| } | |
| if (false === 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); | |
| --EXPECTF-- | |
| object(PgSql\Connection)#%d (0) { | |
| } | |