diff options
author | Gabriel Caruso <carusogabriel34@gmail.com> | 2018-09-16 14:16:42 -0300 |
---|---|---|
committer | Gabriel Caruso <carusogabriel34@gmail.com> | 2018-10-14 12:07:20 -0300 |
commit | 9c144e0d8217d1ef7a83c2498214308b21af749f (patch) | |
tree | d977ba0d8601de477c52f62accf02c120ef06253 /ext/sockets | |
parent | b419732ddb0673dc5b15a67ee4bc7f06dd90d7d0 (diff) | |
download | php-git-9c144e0d8217d1ef7a83c2498214308b21af749f.tar.gz |
Trim trailing whitespace in tests
Diffstat (limited to 'ext/sockets')
20 files changed, 27 insertions, 27 deletions
diff --git a/ext/sockets/tests/ipv4loop.phpt b/ext/sockets/tests/ipv4loop.phpt index 920b27b66e..4fed237b20 100644 --- a/ext/sockets/tests/ipv4loop.phpt +++ b/ext/sockets/tests/ipv4loop.phpt @@ -26,7 +26,7 @@ IPv4 Loopback test if (!socket_listen($server, 2)) { die('Unable to listen on socket'); } - + /* Connect to it */ $client = socket_create(AF_INET, SOCK_STREAM, getprotobyname('tcp')); if (!$client) { diff --git a/ext/sockets/tests/ipv6loop.phpt b/ext/sockets/tests/ipv6loop.phpt index 4720cb49e4..307f61f082 100644 --- a/ext/sockets/tests/ipv6loop.phpt +++ b/ext/sockets/tests/ipv6loop.phpt @@ -27,7 +27,7 @@ IPv6 Loopback test if (!socket_listen($server, 2)) { die('Unable to listen on socket'); } - + /* Connect to it */ $client = socket_create(AF_INET6, SOCK_STREAM, getprotobyname('tcp')); if (!$client) { diff --git a/ext/sockets/tests/socket_bind.phpt b/ext/sockets/tests/socket_bind.phpt index 28cf36c322..118361e42c 100644 --- a/ext/sockets/tests/socket_bind.phpt +++ b/ext/sockets/tests/socket_bind.phpt @@ -18,11 +18,11 @@ fa@php.net $s_c = socket_create(AF_INET, SOCK_STREAM, SOL_TCP); $s_bind = socket_bind($s_c, '0.0.0.0', 31330+$rand); var_dump($s_bind); - + // Connect to destination address $s_conn = socket_connect($s_c, 'www.php.net', 80); var_dump($s_conn); - + // Write $request = 'GET / HTTP/1.1' . "\r\n"; $s_write = socket_write($s_c, $request); diff --git a/ext/sockets/tests/socket_bind_params.phpt b/ext/sockets/tests/socket_bind_params.phpt index 65b694c1df..29af2a2d45 100644 --- a/ext/sockets/tests/socket_bind_params.phpt +++ b/ext/sockets/tests/socket_bind_params.phpt @@ -16,7 +16,7 @@ fa@php.net $s_w = socket_bind(); var_dump($s_w); $s_w = socket_bind($s_c); - var_dump($s_w); + var_dump($s_w); socket_close($s_c); ?> diff --git a/ext/sockets/tests/socket_close_params.phpt b/ext/sockets/tests/socket_close_params.phpt index 8ba0e44c5b..91cc85195e 100644 --- a/ext/sockets/tests/socket_close_params.phpt +++ b/ext/sockets/tests/socket_close_params.phpt @@ -13,7 +13,7 @@ fa@php.net <?php // wrong parameter count $s_c = socket_close(); - var_dump($s_c); + var_dump($s_c); ?> --EXPECTF-- diff --git a/ext/sockets/tests/socket_connect_error.phpt b/ext/sockets/tests/socket_connect_error.phpt index 5987f502be..713791d849 100644 --- a/ext/sockets/tests/socket_connect_error.phpt +++ b/ext/sockets/tests/socket_connect_error.phpt @@ -16,13 +16,13 @@ display_errors=1 <?php // Test with no arguments $server = socket_create(); - + // Test with less arguments than required $server = socket_create(SOCK_STREAM, getprotobyname('tcp')); - + // Test with non integer parameters $server = socket_create(array(), 1, 1); - + ?> --EXPECTF-- Warning: socket_create() expects exactly 3 parameters, 0 given in %s on line %d diff --git a/ext/sockets/tests/socket_connect_params.phpt b/ext/sockets/tests/socket_connect_params.phpt index e329ce1c99..e731672f57 100644 --- a/ext/sockets/tests/socket_connect_params.phpt +++ b/ext/sockets/tests/socket_connect_params.phpt @@ -11,14 +11,14 @@ fa@php.net ?> --FILE-- <?php - $rand = rand(1,999); + $rand = rand(1,999); $s_c = socket_create_listen(31330+$rand); // wrong parameter count $s_w = socket_connect(); $s_w = socket_connect($s_c); $s_w = socket_connect($s_c, '0.0.0.0'); $s_w = socket_connect($s_c, '0.0.0.0', 31330+$rand); - + socket_close($s_c); ?> diff --git a/ext/sockets/tests/socket_create_listen-win32.phpt b/ext/sockets/tests/socket_create_listen-win32.phpt index 23bf963c5f..f7306262f4 100644 --- a/ext/sockets/tests/socket_create_listen-win32.phpt +++ b/ext/sockets/tests/socket_create_listen-win32.phpt @@ -11,7 +11,7 @@ if (!extension_loaded('sockets')) { --FILE-- <?php $sock = socket_create_listen(31338); -socket_getsockname($sock, $addr, $port); +socket_getsockname($sock, $addr, $port); var_dump($addr, $port); --EXPECT-- string(9) "127.0.0.1" diff --git a/ext/sockets/tests/socket_create_listen.phpt b/ext/sockets/tests/socket_create_listen.phpt index 76f2942587..7083b0a1b9 100644 --- a/ext/sockets/tests/socket_create_listen.phpt +++ b/ext/sockets/tests/socket_create_listen.phpt @@ -11,7 +11,7 @@ if (!extension_loaded('sockets')) { --FILE-- <?php $sock = socket_create_listen(31338); -socket_getsockname($sock, $addr, $port); +socket_getsockname($sock, $addr, $port); var_dump($addr, $port); --EXPECT-- string(7) "0.0.0.0" diff --git a/ext/sockets/tests/socket_getpeername.phpt b/ext/sockets/tests/socket_getpeername.phpt index 1a542d0702..34de42de80 100644 --- a/ext/sockets/tests/socket_getpeername.phpt +++ b/ext/sockets/tests/socket_getpeername.phpt @@ -15,7 +15,7 @@ fa@php.net $s_c = socket_create(AF_INET, SOCK_STREAM, SOL_TCP); $s_bind = socket_bind($s_c, '0.0.0.0', 31330+$rand); var_dump($s_bind); - + // Connect to destination address $s_peer = socket_getpeername($s_c, $ip, $port); var_dump($s_peer); diff --git a/ext/sockets/tests/socket_getpeername_ipv4loop.phpt b/ext/sockets/tests/socket_getpeername_ipv4loop.phpt index 083ed55e5d..efd2a6b445 100644 --- a/ext/sockets/tests/socket_getpeername_ipv4loop.phpt +++ b/ext/sockets/tests/socket_getpeername_ipv4loop.phpt @@ -4,13 +4,13 @@ ext/sockets - socket_getpeername_ipv4loop - basic test Tatjana Andersen tatjana.andersen@redpill-linpro.com # TestFest 2009 - NorwayUG --SKIPIF-- -<?php +<?php if (!extension_loaded('sockets')) { die('skip sockets extension not available.'); } ?> --FILE-- -<?php +<?php /* Bind and connect sockets to localhost */ $localhost = '127.0.0.1'; diff --git a/ext/sockets/tests/socket_getpeername_ipv6loop.phpt b/ext/sockets/tests/socket_getpeername_ipv6loop.phpt index 96041287f4..a4965a8601 100644 --- a/ext/sockets/tests/socket_getpeername_ipv6loop.phpt +++ b/ext/sockets/tests/socket_getpeername_ipv6loop.phpt @@ -4,14 +4,14 @@ ext/sockets - socket_getpeername_ipv6loop - basic test Tatjana Andersen tatjana.andersen@redpill-linpro.com # TestFest 2009 - NorwayUG --SKIPIF-- -<?php +<?php if (!extension_loaded('sockets')) { die('skip sockets extension not available.'); } require 'ipv6_skipif.inc'; ?> --FILE-- -<?php +<?php /* Bind and connect sockets to localhost */ $localhost = '::1'; diff --git a/ext/sockets/tests/socket_getsockname.phpt b/ext/sockets/tests/socket_getsockname.phpt index 877bef5016..f3f392130c 100644 --- a/ext/sockets/tests/socket_getsockname.phpt +++ b/ext/sockets/tests/socket_getsockname.phpt @@ -15,7 +15,7 @@ fa@php.net $s_c = socket_create(AF_INET, SOCK_STREAM, SOL_TCP); $s_bind = socket_bind($s_c, '0.0.0.0', 31330+$rand); var_dump($s_bind); - + // Connect to destination address $s_conn = socket_getsockname($s_c, $ip, $port); var_dump($s_conn); diff --git a/ext/sockets/tests/socket_listen-wrongparams.phpt b/ext/sockets/tests/socket_listen-wrongparams.phpt index b5e13548eb..41d7ac1f10 100644 --- a/ext/sockets/tests/socket_listen-wrongparams.phpt +++ b/ext/sockets/tests/socket_listen-wrongparams.phpt @@ -11,7 +11,7 @@ if (!extension_loaded('sockets')) { --FILE-- <?php var_dump(socket_listen(null)); -$socket = socket_create(AF_UNIX, SOCK_STREAM, 0); +$socket = socket_create(AF_UNIX, SOCK_STREAM, 0); var_dump(socket_listen($socket)); --EXPECTF-- Warning: socket_listen() expects parameter 1 to be resource, null given in %s on line %d diff --git a/ext/sockets/tests/socket_listen_params.phpt b/ext/sockets/tests/socket_listen_params.phpt index 5b6d3b1459..5e20999374 100644 --- a/ext/sockets/tests/socket_listen_params.phpt +++ b/ext/sockets/tests/socket_listen_params.phpt @@ -13,7 +13,7 @@ fa@php.net <?php // wrong parameter count $s_c = socket_listen(); - var_dump($s_c); + var_dump($s_c); ?> --EXPECTF-- diff --git a/ext/sockets/tests/socket_sendrecvmsg_multi_msg-unix.phpt b/ext/sockets/tests/socket_sendrecvmsg_multi_msg-unix.phpt index 6b46f33715..fb9a311b17 100644 --- a/ext/sockets/tests/socket_sendrecvmsg_multi_msg-unix.phpt +++ b/ext/sockets/tests/socket_sendrecvmsg_multi_msg-unix.phpt @@ -9,7 +9,7 @@ require 'ipv6_skipif.inc'; if (!defined('IPPROTO_IPV6')) die('skip IPv6 not available.'); -if (substr(PHP_OS, 0, 3) == 'WIN') +if (substr(PHP_OS, 0, 3) == 'WIN') die('skip Not for the Windows!'); /* Windows supports IPV6_RECVTCLASS and is able to receive the tclass via * WSARecvMsg (though only the top 6 bits seem to reported), but WSASendMsg diff --git a/ext/sockets/tests/socket_sentto_recvfrom_ipv4_udp.phpt b/ext/sockets/tests/socket_sentto_recvfrom_ipv4_udp.phpt index 5aeaa0824f..ced060e8a3 100644 --- a/ext/sockets/tests/socket_sentto_recvfrom_ipv4_udp.phpt +++ b/ext/sockets/tests/socket_sentto_recvfrom_ipv4_udp.phpt @@ -14,13 +14,13 @@ if (!extension_loaded('sockets')) { if (!socket_set_nonblock($socket)) { die('Unable to set nonblocking mode for socket'); } - + $address = '127.0.0.1'; socket_sendto($socket, '', 1, 0, $address); // cause warning if (!socket_bind($socket, $address, 1223)) { die("Unable to bind to $address:1223"); } - + var_dump(socket_recvfrom($socket, $buf, 12, 0, $from, $port)); //false (EAGAIN - no warning) $msg = "Ping!"; diff --git a/ext/sockets/tests/socket_set_option_in6_pktinfo.phpt b/ext/sockets/tests/socket_set_option_in6_pktinfo.phpt index 75019cafac..c44f58e793 100644 --- a/ext/sockets/tests/socket_set_option_in6_pktinfo.phpt +++ b/ext/sockets/tests/socket_set_option_in6_pktinfo.phpt @@ -16,7 +16,7 @@ if (substr(PHP_OS, 0, 3) == 'WIN') { } if (!defined('IPV6_PKTINFO')) { die('skip IPV6_PKTINFO not available.'); -} +} --FILE-- <?php diff --git a/ext/sockets/tests/unixloop.phpt b/ext/sockets/tests/unixloop.phpt index 4a19444859..cd4afd65c7 100644 --- a/ext/sockets/tests/unixloop.phpt +++ b/ext/sockets/tests/unixloop.phpt @@ -27,7 +27,7 @@ if (substr(PHP_OS, 0, 3) == 'WIN') { if (!socket_listen($server, 2)) { die('Unable to listen on socket'); } - + /* Connect to it */ $client = socket_create(AF_UNIX, SOCK_STREAM, 0); if (!$client) { diff --git a/ext/sockets/tests/wsaprotocol_info_0.phpt b/ext/sockets/tests/wsaprotocol_info_0.phpt index b51dab227a..19550d11e9 100644 --- a/ext/sockets/tests/wsaprotocol_info_0.phpt +++ b/ext/sockets/tests/wsaprotocol_info_0.phpt @@ -38,7 +38,7 @@ if (!extension_loaded('sockets')) { socket_close($sock2); var_dump($sock, $sock2); - /* Using invalid PID. */ + /* Using invalid PID. */ $info = socket_wsaprotocol_info_export($sock, 123412341); socket_close($sock); |