summaryrefslogtreecommitdiff
path: root/ext/pgsql/tests
diff options
context:
space:
mode:
Diffstat (limited to 'ext/pgsql/tests')
-rw-r--r--ext/pgsql/tests/05large_object.phpt2
-rw-r--r--ext/pgsql/tests/08escape.phpt2
-rw-r--r--ext/pgsql/tests/17result.phpt2
-rw-r--r--ext/pgsql/tests/18pg_escape_bytea_before.phpt2
-rw-r--r--ext/pgsql/tests/18pg_escape_bytea_esc.phpt2
-rw-r--r--ext/pgsql/tests/18pg_escape_bytea_hex.phpt2
-rw-r--r--ext/pgsql/tests/22pg_fetch_object.phpt2
-rw-r--r--[-rwxr-xr-x]ext/pgsql/tests/29nb_async_connect.phpt0
-rw-r--r--[-rwxr-xr-x]ext/pgsql/tests/30nb_async_query_params.phpt0
-rw-r--r--[-rwxr-xr-x]ext/pgsql/tests/31nb_async_query_prepared.phpt0
-rw-r--r--ext/pgsql/tests/80_bug14383.phpt6
-rw-r--r--ext/pgsql/tests/80_bug27597.phpt2
-rw-r--r--ext/pgsql/tests/80_bug36625.phpt4
-rw-r--r--ext/pgsql/tests/CONFLICTS1
-rw-r--r--ext/pgsql/tests/bug76548.phpt2
-rw-r--r--ext/pgsql/tests/skipif.inc2
16 files changed, 16 insertions, 15 deletions
diff --git a/ext/pgsql/tests/05large_object.phpt b/ext/pgsql/tests/05large_object.phpt
index a6f30195ae..e091d6072a 100644
--- a/ext/pgsql/tests/05large_object.phpt
+++ b/ext/pgsql/tests/05large_object.phpt
@@ -55,7 +55,7 @@ pg_lo_unlink($db, (string)$oid) or print("pg_lo_unlink() error 3\n");
pg_exec ($db, "commit");
echo "import/export LO\n";
-$path = dirname(__FILE__) . '/';
+$path = __DIR__ . '/';
pg_query($db, 'begin');
$oid = pg_lo_import($db, $path . 'php.gif');
pg_query($db, 'commit');
diff --git a/ext/pgsql/tests/08escape.phpt b/ext/pgsql/tests/08escape.phpt
index 1bea35bf14..9120b455e7 100644
--- a/ext/pgsql/tests/08escape.phpt
+++ b/ext/pgsql/tests/08escape.phpt
@@ -6,7 +6,7 @@ PostgreSQL escape functions
<?php
include 'config.inc';
-define('FILE_NAME', dirname(__FILE__) . '/php.gif');
+define('FILE_NAME', __DIR__ . '/php.gif');
// pg_escape_string() test
$before = "ABC\\ABC\'";
diff --git a/ext/pgsql/tests/17result.phpt b/ext/pgsql/tests/17result.phpt
index c3f9959aa2..4e321ca3f8 100644
--- a/ext/pgsql/tests/17result.phpt
+++ b/ext/pgsql/tests/17result.phpt
@@ -11,7 +11,7 @@ include 'config.inc';
$db = pg_connect($conn_str);
$sql = "SELECT * FROM $table_name";
-$result = pg_query($db, $sql) or die('Cannot qeury db');
+$result = pg_query($db, $sql) or die('Cannot query db');
$rows = pg_num_rows($result);
var_dump(pg_result_seek($result, 1));
diff --git a/ext/pgsql/tests/18pg_escape_bytea_before.phpt b/ext/pgsql/tests/18pg_escape_bytea_before.phpt
index 492517733f..ca2acd9ce7 100644
--- a/ext/pgsql/tests/18pg_escape_bytea_before.phpt
+++ b/ext/pgsql/tests/18pg_escape_bytea_before.phpt
@@ -8,7 +8,7 @@ PostgreSQL pg_escape_bytea() functions (before connection)
include('config.inc');
-$image = file_get_contents(dirname(__FILE__) . '/php.gif');
+$image = file_get_contents(__DIR__ . '/php.gif');
$esc_image = pg_escape_bytea($image);
$db = pg_connect($conn_str);
diff --git a/ext/pgsql/tests/18pg_escape_bytea_esc.phpt b/ext/pgsql/tests/18pg_escape_bytea_esc.phpt
index 38e5777c3e..263adad40c 100644
--- a/ext/pgsql/tests/18pg_escape_bytea_esc.phpt
+++ b/ext/pgsql/tests/18pg_escape_bytea_esc.phpt
@@ -11,7 +11,7 @@ include('config.inc');
$db = pg_connect($conn_str);
@pg_query($db, "SET bytea_output = 'escape'");
-$image = file_get_contents(dirname(__FILE__) . '/php.gif');
+$image = file_get_contents(__DIR__ . '/php.gif');
$esc_image = pg_escape_bytea($image);
pg_query($db, 'INSERT INTO '.$table_name.' (num, bin) VALUES (9876, \''.$esc_image.'\');');
diff --git a/ext/pgsql/tests/18pg_escape_bytea_hex.phpt b/ext/pgsql/tests/18pg_escape_bytea_hex.phpt
index 04630bbbf8..5af7bbebef 100644
--- a/ext/pgsql/tests/18pg_escape_bytea_hex.phpt
+++ b/ext/pgsql/tests/18pg_escape_bytea_hex.phpt
@@ -14,7 +14,7 @@ include('config.inc');
$db = pg_connect($conn_str);
@pg_query($db, "SET bytea_output = 'hex'");
-$image = file_get_contents(dirname(__FILE__) . '/php.gif');
+$image = file_get_contents(__DIR__ . '/php.gif');
$esc_image = pg_escape_bytea($image);
pg_query($db, 'INSERT INTO '.$table_name.' (num, bin) VALUES (9876, \''.$esc_image.'\');');
diff --git a/ext/pgsql/tests/22pg_fetch_object.phpt b/ext/pgsql/tests/22pg_fetch_object.phpt
index 76a3fbeed3..ebdf77568e 100644
--- a/ext/pgsql/tests/22pg_fetch_object.phpt
+++ b/ext/pgsql/tests/22pg_fetch_object.phpt
@@ -17,7 +17,7 @@ class test_class {
$db = pg_connect($conn_str);
$sql = "SELECT * FROM $table_name WHERE num = 0";
-$result = pg_query($db, $sql) or die('Cannot qeury db');
+$result = pg_query($db, $sql) or die('Cannot query db');
$rows = pg_num_rows($result);
var_dump(pg_fetch_object($result, NULL, 'test_class', array(1, 2)));
diff --git a/ext/pgsql/tests/29nb_async_connect.phpt b/ext/pgsql/tests/29nb_async_connect.phpt
index fc3868a26d..fc3868a26d 100755..100644
--- a/ext/pgsql/tests/29nb_async_connect.phpt
+++ b/ext/pgsql/tests/29nb_async_connect.phpt
diff --git a/ext/pgsql/tests/30nb_async_query_params.phpt b/ext/pgsql/tests/30nb_async_query_params.phpt
index 1c8a1eed8f..1c8a1eed8f 100755..100644
--- a/ext/pgsql/tests/30nb_async_query_params.phpt
+++ b/ext/pgsql/tests/30nb_async_query_params.phpt
diff --git a/ext/pgsql/tests/31nb_async_query_prepared.phpt b/ext/pgsql/tests/31nb_async_query_prepared.phpt
index f485e596f9..f485e596f9 100755..100644
--- a/ext/pgsql/tests/31nb_async_query_prepared.phpt
+++ b/ext/pgsql/tests/31nb_async_query_prepared.phpt
diff --git a/ext/pgsql/tests/80_bug14383.phpt b/ext/pgsql/tests/80_bug14383.phpt
index 97fcfe6dcb..1331f146cc 100644
--- a/ext/pgsql/tests/80_bug14383.phpt
+++ b/ext/pgsql/tests/80_bug14383.phpt
@@ -2,7 +2,7 @@
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');
+require_once(__DIR__.'/../../dba/tests/skipif.inc');
require_once('skipif.inc');
?>
--FILE--
@@ -15,8 +15,8 @@ if (!$dbh) {
}
pg_close($dbh);
-require_once(dirname(__FILE__).'/../../dba/tests/test.inc');
-require_once(dirname(__FILE__).'/../../dba/tests/dba_handler.inc');
+require_once(__DIR__.'/../../dba/tests/test.inc');
+require_once(__DIR__.'/../../dba/tests/dba_handler.inc');
?>
--EXPECTF--
diff --git a/ext/pgsql/tests/80_bug27597.phpt b/ext/pgsql/tests/80_bug27597.phpt
index 36e85044d5..6411d9ba36 100644
--- a/ext/pgsql/tests/80_bug27597.phpt
+++ b/ext/pgsql/tests/80_bug27597.phpt
@@ -7,7 +7,7 @@ require_once('skipif.inc');
--FILE--
<?php
-require_once(dirname(__FILE__) . '/config.inc');
+require_once(__DIR__ . '/config.inc');
$dbh = @pg_connect($conn_str);
if (!$dbh) {
diff --git a/ext/pgsql/tests/80_bug36625.phpt b/ext/pgsql/tests/80_bug36625.phpt
index 86d40ce4dc..b36ff4e890 100644
--- a/ext/pgsql/tests/80_bug36625.phpt
+++ b/ext/pgsql/tests/80_bug36625.phpt
@@ -14,7 +14,7 @@ if (!$dbh) {
die ('Could not connect to the server');
}
-$tracefile = dirname(__FILE__) . '/trace.tmp';
+$tracefile = __DIR__ . '/trace.tmp';
@unlink($tracefile);
var_dump(file_exists($tracefile));
@@ -44,7 +44,7 @@ var_dump(file_exists($tracefile));
--CLEAN--
<?php
-$tracefile = dirname(__FILE__) . '/trace.tmp';
+$tracefile = __DIR__ . '/trace.tmp';
unlink($tracefile);
diff --git a/ext/pgsql/tests/CONFLICTS b/ext/pgsql/tests/CONFLICTS
new file mode 100644
index 0000000000..7ecf66a952
--- /dev/null
+++ b/ext/pgsql/tests/CONFLICTS
@@ -0,0 +1 @@
+pgsql
diff --git a/ext/pgsql/tests/bug76548.phpt b/ext/pgsql/tests/bug76548.phpt
index 3a0b8922e1..00940dcec0 100644
--- a/ext/pgsql/tests/bug76548.phpt
+++ b/ext/pgsql/tests/bug76548.phpt
@@ -16,7 +16,7 @@ while ($value = pg_fetch_result($result, 0)) {
?>
==DONE==
---EXPECTF--
+--EXPECT--
string(1) "1"
string(1) "2"
string(1) "3"
diff --git a/ext/pgsql/tests/skipif.inc b/ext/pgsql/tests/skipif.inc
index 83904af4f3..e24847445c 100644
--- a/ext/pgsql/tests/skipif.inc
+++ b/ext/pgsql/tests/skipif.inc
@@ -10,7 +10,7 @@ include("config.inc");
include("lcmess.inc");
if (!extension_loaded("pgsql")) {
- die("skip\n");
+ die("skip pgsql extension not loaded\n");
}
$conn = @pg_connect($conn_str);
if (!is_resource($conn)) {