diff options
Diffstat (limited to 'ext/pgsql')
| -rw-r--r-- | ext/pgsql/tests/00version.phpt | 30 | ||||
| -rw-r--r-- | ext/pgsql/tests/14pg_update_9.phpt | 2 | ||||
| -rw-r--r-- | ext/pgsql/tests/80_bug14383.phpt | 2 | ||||
| -rw-r--r-- | ext/pgsql/tests/80_bug36625.phpt | 2 | ||||
| -rw-r--r-- | ext/pgsql/tests/80_bug39971.phpt | 2 | ||||
| -rw-r--r-- | ext/pgsql/tests/config.inc | 4 |
6 files changed, 37 insertions, 5 deletions
diff --git a/ext/pgsql/tests/00version.phpt b/ext/pgsql/tests/00version.phpt new file mode 100644 index 0000000000..d72d9e1f21 --- /dev/null +++ b/ext/pgsql/tests/00version.phpt @@ -0,0 +1,30 @@ +--TEST-- +PostgreSQL version +--SKIPIF-- +<?php include("skipif.inc"); ?> +--FILE-- +<?php +// Get postgresql version for easier debugging. +// Execute run-test.php with --keep-all to get version string in 00version.log or 00version.out +include('config.inc'); + +$db = pg_connect($conn_str); +var_dump(pg_version($db)); +pg_close($db); + +// Get environment vars for debugging +var_dump(serialize($_ENV)); + +echo "OK"; +?> +--EXPECTF-- +array(3) { + ["client"]=> + string(%d) "%s" + ["protocol"]=> + int(%d) + ["server"]=> + string(%d) "%s" +} +string(%d) "%s" +OK diff --git a/ext/pgsql/tests/14pg_update_9.phpt b/ext/pgsql/tests/14pg_update_9.phpt index e766c1f380..c33f1afbd6 100644 --- a/ext/pgsql/tests/14pg_update_9.phpt +++ b/ext/pgsql/tests/14pg_update_9.phpt @@ -1,5 +1,5 @@ --TEST-- -PostgreSQL pg_update() (9.0) +PostgreSQL pg_update() (9.0+) --SKIPIF-- <?php include("skipif.inc"); diff --git a/ext/pgsql/tests/80_bug14383.phpt b/ext/pgsql/tests/80_bug14383.phpt index a736f34c90..cb54aa8dfb 100644 --- a/ext/pgsql/tests/80_bug14383.phpt +++ b/ext/pgsql/tests/80_bug14383.phpt @@ -1,5 +1,5 @@ --TEST-- -Bug #14383 (using postgres with DBA causes DBA not to be able to find any keys) +Bug #14383 (8.0+) (using postgres with DBA causes DBA not to be able to find any keys) --SKIPIF-- <?php require_once(dirname(__FILE__).'/../../dba/tests/skipif.inc'); diff --git a/ext/pgsql/tests/80_bug36625.phpt b/ext/pgsql/tests/80_bug36625.phpt index 9cc8a1d4fd..e1b7fa1b50 100644 --- a/ext/pgsql/tests/80_bug36625.phpt +++ b/ext/pgsql/tests/80_bug36625.phpt @@ -1,5 +1,5 @@ --TEST-- -Bug #36625 (pg_trace() does not work) +Bug #36625 (8.0+) (pg_trace() does not work) --SKIPIF-- <?php require_once('skipif.inc'); diff --git a/ext/pgsql/tests/80_bug39971.phpt b/ext/pgsql/tests/80_bug39971.phpt index 45d26319d3..49f370b88d 100644 --- a/ext/pgsql/tests/80_bug39971.phpt +++ b/ext/pgsql/tests/80_bug39971.phpt @@ -1,5 +1,5 @@ --TEST-- -Bug #39971 (pg_insert/pg_update do not allow now() to be used for timestamp fields) +Bug #39971 (8.0+) (pg_insert/pg_update do not allow now() to be used for timestamp fields) --SKIPIF-- <?php require_once('skipif.inc'); diff --git a/ext/pgsql/tests/config.inc b/ext/pgsql/tests/config.inc index d4bbb33824..ffe31a875e 100644 --- a/ext/pgsql/tests/config.inc +++ b/ext/pgsql/tests/config.inc @@ -2,8 +2,10 @@ // These vars are used to connect db and create test table. // values can be set to meet your environment +// "test" database must be existed. i.e. "createdb test" before testing +// PostgreSQL uses login name as username, user must have access to "test" database. $conn_str = "host=localhost dbname=test port=5432"; // connection string -$table_name = "php_pgsql_test"; // test table that should be exist +$table_name = "php_pgsql_test"; // test table that will be created $num_test_record = 1000; // Number of records to create $table_def = "CREATE TABLE php_pgsql_test (num int, str text, bin bytea);"; // Test table |
