diff options
Diffstat (limited to 'ext/pgsql')
-rw-r--r-- | ext/pgsql/tests/02connection.phpt | 18 | ||||
-rw-r--r-- | ext/pgsql/tests/03sync_query.phpt | 8 | ||||
-rw-r--r-- | ext/pgsql/tests/04async_query.phpt | 12 | ||||
-rw-r--r-- | ext/pgsql/tests/23sync_query_params.phpt | 12 | ||||
-rw-r--r-- | ext/pgsql/tests/24sync_query_prepared.phpt | 8 | ||||
-rw-r--r-- | ext/pgsql/tests/25async_query_params.phpt | 10 | ||||
-rw-r--r-- | ext/pgsql/tests/26async_query_prepared.phpt | 16 | ||||
-rw-r--r-- | ext/pgsql/tests/27large_object_oid.phpt | 4 | ||||
-rw-r--r-- | ext/pgsql/tests/28large_object_import_oid.phpt | 4 | ||||
-rw-r--r-- | ext/pgsql/tests/80_bug14383.phpt | 4 | ||||
-rw-r--r-- | ext/pgsql/tests/80_bug24499.phpt | 4 | ||||
-rw-r--r-- | ext/pgsql/tests/80_bug27597.phpt | 6 | ||||
-rw-r--r-- | ext/pgsql/tests/80_bug32223.phpt | 6 | ||||
-rw-r--r-- | ext/pgsql/tests/80_bug32223b.phpt | 4 | ||||
-rw-r--r-- | ext/pgsql/tests/80_bug36625.phpt | 2 | ||||
-rw-r--r-- | ext/pgsql/tests/80_bug39971.phpt | 4 | ||||
-rw-r--r-- | ext/pgsql/tests/80_bug42783.phpt | 4 | ||||
-rw-r--r-- | ext/pgsql/tests/9999dropdb.phpt | 2 | ||||
-rw-r--r-- | ext/pgsql/tests/bug71998.phpt | 4 | ||||
-rw-r--r-- | ext/pgsql/tests/bug72197.phpt | 2 |
20 files changed, 67 insertions, 67 deletions
diff --git a/ext/pgsql/tests/02connection.phpt b/ext/pgsql/tests/02connection.phpt index 234427ba19..8db5e2071a 100644 --- a/ext/pgsql/tests/02connection.phpt +++ b/ext/pgsql/tests/02connection.phpt @@ -11,41 +11,41 @@ include('config.inc'); $db = pg_pconnect($conn_str); var_dump($db); -if (pg_connection_status($db) != PGSQL_CONNECTION_OK) +if (pg_connection_status($db) != PGSQL_CONNECTION_OK) { echo "pg_connection_status() error\n"; } -if (!pg_connection_reset($db)) +if (!pg_connection_reset($db)) { echo "pg_connection_reset() error\n"; } -if (pg_connection_busy($db)) +if (pg_connection_busy($db)) { echo "pg_connection_busy() error\n"; } if (function_exists('pg_transaction_status')) { - if (pg_transaction_status($db) != PGSQL_TRANSACTION_IDLE) + if (pg_transaction_status($db) != PGSQL_TRANSACTION_IDLE) { echo "pg_transaction_status() error\n"; } } -if (false === pg_host($db)) +if (false === pg_host($db)) { echo "pg_host() error\n"; } -if (!pg_dbname($db)) +if (!pg_dbname($db)) { echo "pg_dbname() error\n"; } -if (!pg_port($db)) +if (!pg_port($db)) { echo "pg_port() error\n"; } -if (pg_tty($db)) +if (pg_tty($db)) { echo "pg_tty() error\n"; } -if (pg_options($db)) +if (pg_options($db)) { echo "pg_options() error\n"; } diff --git a/ext/pgsql/tests/03sync_query.phpt b/ext/pgsql/tests/03sync_query.phpt index afb6bb4475..eb8fae084d 100644 --- a/ext/pgsql/tests/03sync_query.phpt +++ b/ext/pgsql/tests/03sync_query.phpt @@ -14,19 +14,19 @@ if (!($rows = pg_num_rows($result))) { echo "pg_num_row() error\n"; } -for ($i=0; $i < $rows; $i++) +for ($i=0; $i < $rows; $i++) { pg_fetch_array($result, $i, PGSQL_NUM); } -for ($i=0; $i < $rows; $i++) +for ($i=0; $i < $rows; $i++) { pg_fetch_object($result); } -for ($i=0; $i < $rows; $i++) +for ($i=0; $i < $rows; $i++) { pg_fetch_row($result, $i); } -for ($i=0; $i < $rows; $i++) +for ($i=0; $i < $rows; $i++) { pg_fetch_result($result, $i, 0); } diff --git a/ext/pgsql/tests/04async_query.phpt b/ext/pgsql/tests/04async_query.phpt index 7711240a79..fe67382026 100644 --- a/ext/pgsql/tests/04async_query.phpt +++ b/ext/pgsql/tests/04async_query.phpt @@ -16,7 +16,7 @@ while(pg_connection_busy($db)); // busy wait: intended if (pg_connection_status($db) === PGSQL_CONNECTION_BAD) { echo "pg_connection_status() error\n"; } -if (!($result = pg_get_result($db))) +if (!($result = pg_get_result($db))) { echo "pg_get_result() error\n"; } @@ -24,19 +24,19 @@ if (!($result = pg_get_result($db))) if (!($rows = pg_num_rows($result))) { echo "pg_num_rows() error\n"; } -for ($i=0; $i < $rows; $i++) +for ($i=0; $i < $rows; $i++) { pg_fetch_array($result, $i, PGSQL_NUM); } -for ($i=0; $i < $rows; $i++) +for ($i=0; $i < $rows; $i++) { pg_fetch_object($result); } -for ($i=0; $i < $rows; $i++) +for ($i=0; $i < $rows; $i++) { pg_fetch_row($result, $i); } -for ($i=0; $i < $rows; $i++) +for ($i=0; $i < $rows; $i++) { pg_fetch_result($result, $i, 0); } @@ -50,7 +50,7 @@ pg_field_type($result, 0); pg_field_prtlen($result, 0); pg_field_is_null($result, 0); -if (!pg_send_query($db, "INSERT INTO ".$table_name." VALUES (8888, 'GGG');")) +if (!pg_send_query($db, "INSERT INTO ".$table_name." VALUES (8888, 'GGG');")) { echo "pg_send_query() error\n"; } diff --git a/ext/pgsql/tests/23sync_query_params.phpt b/ext/pgsql/tests/23sync_query_params.phpt index 6959cd75a7..a700ddca17 100644 --- a/ext/pgsql/tests/23sync_query_params.phpt +++ b/ext/pgsql/tests/23sync_query_params.phpt @@ -1,8 +1,8 @@ --TEST-- PostgreSQL sync query params --SKIPIF-- -<?php -include("skipif.inc"); +<?php +include("skipif.inc"); if (!function_exists('pg_query_params')) die('skip function pg_query_params() does not exist'); ?> --FILE-- @@ -19,19 +19,19 @@ if ($version['protocol'] >= 3) { { echo "pg_num_row() error\n"; } - for ($i=0; $i < $rows; $i++) + for ($i=0; $i < $rows; $i++) { pg_fetch_array($result, $i, PGSQL_NUM); } - for ($i=0; $i < $rows; $i++) + for ($i=0; $i < $rows; $i++) { pg_fetch_object($result); } - for ($i=0; $i < $rows; $i++) + for ($i=0; $i < $rows; $i++) { pg_fetch_row($result, $i); } - for ($i=0; $i < $rows; $i++) + for ($i=0; $i < $rows; $i++) { pg_fetch_result($result, $i, 0); } diff --git a/ext/pgsql/tests/24sync_query_prepared.phpt b/ext/pgsql/tests/24sync_query_prepared.phpt index ea8f14661a..ca099eb43b 100644 --- a/ext/pgsql/tests/24sync_query_prepared.phpt +++ b/ext/pgsql/tests/24sync_query_prepared.phpt @@ -22,19 +22,19 @@ if ($version['protocol'] >= 3) { { echo "pg_num_row() error\n"; } - for ($i=0; $i < $rows; $i++) + for ($i=0; $i < $rows; $i++) { pg_fetch_array($result, $i, PGSQL_NUM); } - for ($i=0; $i < $rows; $i++) + for ($i=0; $i < $rows; $i++) { pg_fetch_object($result); } - for ($i=0; $i < $rows; $i++) + for ($i=0; $i < $rows; $i++) { pg_fetch_row($result, $i); } - for ($i=0; $i < $rows; $i++) + for ($i=0; $i < $rows; $i++) { pg_fetch_result($result, $i, 0); } diff --git a/ext/pgsql/tests/25async_query_params.phpt b/ext/pgsql/tests/25async_query_params.phpt index 6e7dafe34b..ae1a1630ef 100644 --- a/ext/pgsql/tests/25async_query_params.phpt +++ b/ext/pgsql/tests/25async_query_params.phpt @@ -21,26 +21,26 @@ if ($version['protocol'] >= 3) { if (pg_connection_status($db) === PGSQL_CONNECTION_BAD) { echo "pg_connection_status() error\n"; } - if (!($result = pg_get_result($db))) + if (!($result = pg_get_result($db))) { echo "pg_get_result() error\n"; } if (!($rows = pg_num_rows($result))) { echo "pg_num_rows() error\n"; } - for ($i=0; $i < $rows; $i++) + for ($i=0; $i < $rows; $i++) { pg_fetch_array($result, $i, PGSQL_NUM); } - for ($i=0; $i < $rows; $i++) + for ($i=0; $i < $rows; $i++) { pg_fetch_object($result); } - for ($i=0; $i < $rows; $i++) + for ($i=0; $i < $rows; $i++) { pg_fetch_row($result, $i); } - for ($i=0; $i < $rows; $i++) + for ($i=0; $i < $rows; $i++) { pg_fetch_result($result, $i, 0); } diff --git a/ext/pgsql/tests/26async_query_prepared.phpt b/ext/pgsql/tests/26async_query_prepared.phpt index bda363b750..33ca7c7bfa 100644 --- a/ext/pgsql/tests/26async_query_prepared.phpt +++ b/ext/pgsql/tests/26async_query_prepared.phpt @@ -21,7 +21,7 @@ if ($version['protocol'] >= 3) { if (pg_connection_status($db) === PGSQL_CONNECTION_BAD) { echo "pg_connection_status() error\n"; } - if (!($result = pg_get_result($db))) + if (!($result = pg_get_result($db))) { echo "pg_get_result() error\n"; } @@ -34,7 +34,7 @@ if ($version['protocol'] >= 3) { if (pg_connection_status($db) === PGSQL_CONNECTION_BAD) { echo "pg_connection_status() error\n"; } - if (!($result = pg_get_result($db))) + if (!($result = pg_get_result($db))) { echo "pg_get_result() error\n"; } @@ -42,19 +42,19 @@ if ($version['protocol'] >= 3) { if (!($rows = pg_num_rows($result))) { echo "pg_num_rows() error\n"; } - for ($i=0; $i < $rows; $i++) + for ($i=0; $i < $rows; $i++) { pg_fetch_array($result, $i, PGSQL_NUM); } - for ($i=0; $i < $rows; $i++) + for ($i=0; $i < $rows; $i++) { pg_fetch_object($result); } - for ($i=0; $i < $rows; $i++) + for ($i=0; $i < $rows; $i++) { pg_fetch_row($result, $i); } - for ($i=0; $i < $rows; $i++) + for ($i=0; $i < $rows; $i++) { pg_fetch_result($result, $i, 0); } @@ -76,7 +76,7 @@ if ($version['protocol'] >= 3) { if (pg_connection_status($db) === PGSQL_CONNECTION_BAD) { echo "pg_connection_status() error\n"; } - if (!($result = pg_get_result($db))) + if (!($result = pg_get_result($db))) { echo "pg_get_result() error\n"; } @@ -90,7 +90,7 @@ if ($version['protocol'] >= 3) { if (pg_connection_status($db) === PGSQL_CONNECTION_BAD) { echo "pg_connection_status() error\n"; } - if (!($result = pg_get_result($db))) + if (!($result = pg_get_result($db))) { echo "pg_get_result() error\n"; } diff --git a/ext/pgsql/tests/27large_object_oid.phpt b/ext/pgsql/tests/27large_object_oid.phpt index 0a469bc20e..c9e33992d7 100644 --- a/ext/pgsql/tests/27large_object_oid.phpt +++ b/ext/pgsql/tests/27large_object_oid.phpt @@ -1,8 +1,8 @@ --TEST-- PostgreSQL create large object with given oid --SKIPIF-- -<?php -include("skipif.inc"); +<?php +include("skipif.inc"); $v = pg_version($conn); if (version_compare("8.3", $v["client"]) > 0) die("skip - requires pg client >= 8.3\n"); if (version_compare("8.3", $v["server"]) > 0) die("skip - requires pg server >= 8.3\n"); diff --git a/ext/pgsql/tests/28large_object_import_oid.phpt b/ext/pgsql/tests/28large_object_import_oid.phpt index 323d179635..9ffb96123e 100644 --- a/ext/pgsql/tests/28large_object_import_oid.phpt +++ b/ext/pgsql/tests/28large_object_import_oid.phpt @@ -1,8 +1,8 @@ --TEST-- PostgreSQL import large object with given oid --SKIPIF-- -<?php -include("skipif.inc"); +<?php +include("skipif.inc"); $v = pg_version($conn); if (version_compare("8.4devel", $v["client"]) > 0) die("skip - requires pg client >= 8.4\n"); if (version_compare("8.4devel", $v["server"]) > 0) die("skip - requires pg server >= 8.4\n"); diff --git a/ext/pgsql/tests/80_bug14383.phpt b/ext/pgsql/tests/80_bug14383.phpt index e73f0fd1fb..97fcfe6dcb 100644 --- a/ext/pgsql/tests/80_bug14383.phpt +++ b/ext/pgsql/tests/80_bug14383.phpt @@ -1,14 +1,14 @@ --TEST-- Bug #14383 (8.0+) (using postgres with DBA causes DBA not to be able to find any keys) --SKIPIF-- -<?php +<?php require_once(dirname(__FILE__).'/../../dba/tests/skipif.inc'); require_once('skipif.inc'); ?> --FILE-- <?php require_once('config.inc'); - + $dbh = @pg_connect($conn_str); if (!$dbh) { die ("Could not connect to the server"); diff --git a/ext/pgsql/tests/80_bug24499.phpt b/ext/pgsql/tests/80_bug24499.phpt index 32e789de8d..a9773bdafe 100644 --- a/ext/pgsql/tests/80_bug24499.phpt +++ b/ext/pgsql/tests/80_bug24499.phpt @@ -1,14 +1,14 @@ --TEST-- Bug #24499 (Notice: Undefined property: stdClass::) --SKIPIF-- -<?php +<?php require_once('skipif.inc'); ?> --FILE-- <?php require_once('config.inc'); - + $dbh = @pg_connect($conn_str); if (!$dbh) { die ("Could not connect to the server"); diff --git a/ext/pgsql/tests/80_bug27597.phpt b/ext/pgsql/tests/80_bug27597.phpt index 7d5b5db890..48f3e33132 100644 --- a/ext/pgsql/tests/80_bug27597.phpt +++ b/ext/pgsql/tests/80_bug27597.phpt @@ -1,14 +1,14 @@ --TEST-- Bug #27597 (pg_fetch_array not returning false) --SKIPIF-- -<?php +<?php require_once('skipif.inc'); ?> --FILE-- <?php require_once(dirname(__FILE__) . '/config.inc'); - + $dbh = @pg_connect($conn_str); if (!$dbh) { die ("Could not connect to the server"); @@ -23,7 +23,7 @@ for ($i=0; $i<4; $i++) { function xi_fetch_array($res, $type = PGSQL_ASSOC) { $a = pg_fetch_array($res, NULL, $type) ; - return $a ; + return $a ; } $res = pg_query("SELECT * FROM id"); diff --git a/ext/pgsql/tests/80_bug32223.phpt b/ext/pgsql/tests/80_bug32223.phpt index b9bbbf86ed..fbe0d5ff97 100644 --- a/ext/pgsql/tests/80_bug32223.phpt +++ b/ext/pgsql/tests/80_bug32223.phpt @@ -1,11 +1,11 @@ --TEST-- Bug #32223 (weird behaviour of pg_last_notice) --SKIPIF-- -<?php +<?php require_once('skipif.inc'); _skip_lc_messages(); - + @pg_query($conn, "CREATE LANGUAGE 'plpgsql' HANDLER plpgsql_call_handler LANCOMPILER 'PL/pgSQL'"); $res = @pg_query($conn, "CREATE OR REPLACE FUNCTION test_notice() RETURNS boolean AS ' begin @@ -22,7 +22,7 @@ pgsql.ignore_notice=0 require_once('config.inc'); require_once('lcmess.inc'); - + $dbh = @pg_connect($conn_str); if (!$dbh) { die ("Could not connect to the server"); diff --git a/ext/pgsql/tests/80_bug32223b.phpt b/ext/pgsql/tests/80_bug32223b.phpt index 418ccfc9ae..9e0e0f7132 100644 --- a/ext/pgsql/tests/80_bug32223b.phpt +++ b/ext/pgsql/tests/80_bug32223b.phpt @@ -1,11 +1,11 @@ --TEST-- Bug #32223 (weird behaviour of pg_last_notice using define) --SKIPIF-- -<?php +<?php require_once('skipif.inc'); _skip_lc_messages(); - + @pg_query($conn, "CREATE LANGUAGE 'plpgsql' HANDLER plpgsql_call_handler LANCOMPILER 'PL/pgSQL'"); $res = @pg_query($conn, "CREATE OR REPLACE FUNCTION test_notice() RETURNS boolean AS ' begin diff --git a/ext/pgsql/tests/80_bug36625.phpt b/ext/pgsql/tests/80_bug36625.phpt index 87dd84adc4..86d40ce4dc 100644 --- a/ext/pgsql/tests/80_bug36625.phpt +++ b/ext/pgsql/tests/80_bug36625.phpt @@ -8,7 +8,7 @@ require_once('skipif.inc'); <?php require_once('config.inc'); - + $dbh = @pg_connect($conn_str); if (!$dbh) { die ('Could not connect to the server'); diff --git a/ext/pgsql/tests/80_bug39971.phpt b/ext/pgsql/tests/80_bug39971.phpt index 49f370b88d..14c7fbd547 100644 --- a/ext/pgsql/tests/80_bug39971.phpt +++ b/ext/pgsql/tests/80_bug39971.phpt @@ -1,14 +1,14 @@ --TEST-- Bug #39971 (8.0+) (pg_insert/pg_update do not allow now() to be used for timestamp fields) --SKIPIF-- -<?php +<?php require_once('skipif.inc'); ?> --FILE-- <?php require_once('config.inc'); - + $dbh = @pg_connect($conn_str); if (!$dbh) { die ("Could not connect to the server"); diff --git a/ext/pgsql/tests/80_bug42783.phpt b/ext/pgsql/tests/80_bug42783.phpt index 575e527db9..91461f4b73 100644 --- a/ext/pgsql/tests/80_bug42783.phpt +++ b/ext/pgsql/tests/80_bug42783.phpt @@ -1,14 +1,14 @@ --TEST-- Bug #42783 (pg_insert() does not support an empty value array) --SKIPIF-- -<?php +<?php require_once('skipif.inc'); ?> --FILE-- <?php require_once('config.inc'); - + $dbh = @pg_connect($conn_str); if (!$dbh) { die ("Could not connect to the server"); diff --git a/ext/pgsql/tests/9999dropdb.phpt b/ext/pgsql/tests/9999dropdb.phpt index 80502e54b6..f3583a545b 100644 --- a/ext/pgsql/tests/9999dropdb.phpt +++ b/ext/pgsql/tests/9999dropdb.phpt @@ -4,7 +4,7 @@ PostgreSQL drop db <?php include("skipif.inc"); ?> --FILE-- <?php -// drop test table +// drop test table include('config.inc'); diff --git a/ext/pgsql/tests/bug71998.phpt b/ext/pgsql/tests/bug71998.phpt index b9924166f9..f69261c1c0 100644 --- a/ext/pgsql/tests/bug71998.phpt +++ b/ext/pgsql/tests/bug71998.phpt @@ -4,7 +4,7 @@ Bug #71998 Function pg_insert does not insert when column type = inet <?php include("skipif.inc"); ?> --FILE-- <?php -// Kudos for the IP regex to +// Kudos for the IP regex to // http://stackoverflow.com/a/17871737/3358424 include('config.inc'); @@ -55,7 +55,7 @@ $i = 0; $errors = 0; foreach ($ips as $ip) { $data = array("id" => ++$i, "remote_addr" => $ip); - $r = @pg_insert($db, 'tmp_statistics', $data); + $r = @pg_insert($db, 'tmp_statistics', $data); if (!$r && in_array($ip, $bad)) { $errors++; diff --git a/ext/pgsql/tests/bug72197.phpt b/ext/pgsql/tests/bug72197.phpt index 2ce15bdaf4..6b6cc3ec67 100644 --- a/ext/pgsql/tests/bug72197.phpt +++ b/ext/pgsql/tests/bug72197.phpt @@ -1,5 +1,5 @@ --TEST-- -Bug #72197 pg_lo_create arbitrary read +Bug #72197 pg_lo_create arbitrary read --SKIPIF-- <?php include("skipif.inc"); ?> --FILE-- |