diff --git a/ext/sockets/tests/socket_create_listen-nobind.phpt b/ext/sockets/tests/socket_create_listen-nobind.phpt index 81e7297339d01..d6a9a767a3276 100644 --- a/ext/sockets/tests/socket_create_listen-nobind.phpt +++ b/ext/sockets/tests/socket_create_listen-nobind.phpt @@ -5,13 +5,14 @@ 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 = __DIR__ . '/006_root_check.tmp'; +$filename = __FILE__ . '.root_check.tmp'; $fp = fopen($filename, 'w'); fclose($fp); if (fileowner($filename) == 0) { - unlink ($filename); + unlink($filename); die('SKIP Test cannot be run as root.'); } +unlink($filename); if (@socket_create_listen(80)) { die('SKIP Test cannot be run in environment that will allow binding to port 80 (azure)'); } @@ -20,9 +21,6 @@ if (@socket_create_listen(80)) { $sock = socket_create_listen(80); --EXPECTF-- Warning: socket_create_listen(): unable to bind to given address [13]: Permission denied in %s on line %d ---CLEAN-- - --FILE-- ---CLEAN-- - --FILE-- --FILE-- --FILE-- --FILE-- --FILE-- --FILE-- --FILE-- --FILE-- --FILE-- --FILE-- --FILE-- --FILE-- --FILE-- --FILE-- --FILE-- --FILE-- --FILE-- --FILE-- --FILE-- --FILE-- --FILE-- --FILE-- --FILE-- --FILE-- --FILE-- --FILE-- --FILE-- --FILE-- --FILE-- --FILE-- --FILE--