summaryrefslogtreecommitdiff
path: root/ext/sockets
diff options
context:
space:
mode:
authorFabien Villepinte <fabien.villepinte@gmail.com>2019-03-15 22:55:30 +0100
committerPeter Kokot <peterkokot@gmail.com>2019-03-15 22:55:30 +0100
commit26dfce7f36d1c6f737ac241df1315a1b42b932c7 (patch)
tree570279b2f4d66a3de7f6ff7f7c865654ad04cea4 /ext/sockets
parent63802a8446691869371bb37078d55b99cae7eb95 (diff)
downloadphp-git-26dfce7f36d1c6f737ac241df1315a1b42b932c7.tar.gz
Replace dirname(__FILE__) by __DIR__ in tests
Diffstat (limited to 'ext/sockets')
-rw-r--r--ext/sockets/tests/socket_create_listen-nobind.phpt4
-rw-r--r--ext/sockets/tests/socket_set_option_error_socket_option.phpt4
2 files changed, 4 insertions, 4 deletions
diff --git a/ext/sockets/tests/socket_create_listen-nobind.phpt b/ext/sockets/tests/socket_create_listen-nobind.phpt
index bd7e5bfd43..c23ed5b642 100644
--- a/ext/sockets/tests/socket_create_listen-nobind.phpt
+++ b/ext/sockets/tests/socket_create_listen-nobind.phpt
@@ -5,7 +5,7 @@ Test if socket_create_listen() returns false, when it cannot bind to the port.
if (!extension_loaded('sockets')) {
die('SKIP The sockets extension is not loaded.');
}
-$filename = dirname(__FILE__) . '/006_root_check.tmp';
+$filename = __DIR__ . '/006_root_check.tmp';
$fp = fopen($filename, 'w');
fclose($fp);
if (fileowner($filename) == 0) {
@@ -19,7 +19,7 @@ $sock = socket_create_listen(80);
Warning: socket_create_listen(): unable to bind to given address [13]: Permission denied in %s on line %d
--CLEAN--
<?php
-unlink(dirname(__FILE__) . '/006_root_check.tmp');
+unlink(__DIR__ . '/006_root_check.tmp');
--CREDITS--
Till Klampaeckel, till@php.net
PHP Testfest Berlin 2009-05-09
diff --git a/ext/sockets/tests/socket_set_option_error_socket_option.phpt b/ext/sockets/tests/socket_set_option_error_socket_option.phpt
index ea3b36d99f..18afcc8fb1 100644
--- a/ext/sockets/tests/socket_set_option_error_socket_option.phpt
+++ b/ext/sockets/tests/socket_set_option_error_socket_option.phpt
@@ -8,7 +8,7 @@ if (!extension_loaded('sockets')) {
if (PHP_OS == 'Darwin') {
die('skip Not for OSX');
}
-$filename = dirname(__FILE__) . '/006_root_check.tmp';
+$filename = __DIR__ . '/006_root_check.tmp';
$fp = fopen($filename, 'w');
fclose($fp);
if (fileowner($filename) == 0) {
@@ -28,7 +28,7 @@ socket_close($socket);
?>
--CLEAN--
<?php
-unlink(dirname(__FILE__) . '/006_root_check.tmp');
+unlink(__DIR__ . '/006_root_check.tmp');
--EXPECTF--
Warning: socket_set_option(): unable to set socket option [%d]: Permission denied in %s on line %d
--CREDITS--