summaryrefslogtreecommitdiff
path: root/ext/pgsql
diff options
context:
space:
mode:
authorPeter Kokot <peterkokot@gmail.com>2019-03-15 23:36:47 +0100
committerPeter Kokot <peterkokot@gmail.com>2019-03-15 23:36:47 +0100
commit6426420f61de0df32a6085924d25b347c8788363 (patch)
treeef32814ffbea0ad3c3c38a942f9751302606c736 /ext/pgsql
parentf26c8644bb340e9e7abb6d1cedb091e9d87dd1d4 (diff)
parent26dfce7f36d1c6f737ac241df1315a1b42b932c7 (diff)
downloadphp-git-6426420f61de0df32a6085924d25b347c8788363.tar.gz
Merge branch 'PHP-7.4'
* PHP-7.4: Replace dirname(__FILE__) by __DIR__ in tests
Diffstat (limited to 'ext/pgsql')
-rw-r--r--ext/pgsql/tests/05large_object.phpt2
-rw-r--r--ext/pgsql/tests/08escape.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/80_bug14383.phpt6
-rw-r--r--ext/pgsql/tests/80_bug27597.phpt2
-rw-r--r--ext/pgsql/tests/80_bug36625.phpt4
8 files changed, 11 insertions, 11 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/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/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);