summaryrefslogtreecommitdiff
path: root/ext/sockets/tests/socket_import_stream-4-win.phpt
diff options
context:
space:
mode:
Diffstat (limited to 'ext/sockets/tests/socket_import_stream-4-win.phpt')
-rw-r--r--ext/sockets/tests/socket_import_stream-4-win.phpt30
1 files changed, 19 insertions, 11 deletions
diff --git a/ext/sockets/tests/socket_import_stream-4-win.phpt b/ext/sockets/tests/socket_import_stream-4-win.phpt
index e14e94c122..9161db2cf1 100644
--- a/ext/sockets/tests/socket_import_stream-4-win.phpt
+++ b/ext/sockets/tests/socket_import_stream-4-win.phpt
@@ -14,15 +14,27 @@ if(substr(PHP_OS, 0, 3) != 'WIN' ) {
function test($stream, $sock) {
if ($stream !== null) {
echo "stream_set_blocking ";
- print_r(stream_set_blocking($stream, 0));
+ try {
+ print_r(stream_set_blocking($stream, 0));
+ } catch (TypeError $e) {
+ echo $e->getMessage(), "\n";
+ }
echo "\n";
}
if ($sock !== null) {
echo "socket_set_block ";
- print_r(socket_set_block($sock));
+ try {
+ print_r(socket_set_block($sock));
+ } catch (TypeError $e) {
+ echo $e->getMessage(), "\n";
+ }
echo "\n";
echo "socket_get_option ";
- print_r(socket_get_option($sock, SOL_SOCKET, SO_TYPE));
+ try {
+ print_r(socket_get_option($sock, SOL_SOCKET, SO_TYPE));
+ } catch (TypeError $e) {
+ echo $e->getMessage(), "\n";
+ }
echo "\n";
}
echo "\n";
@@ -75,8 +87,7 @@ stream_set_blocking 1
close stream
-stream_set_blocking
-Warning: stream_set_blocking(): supplied resource is not a valid stream resource in %s on line %d
+stream_set_blocking stream_set_blocking(): supplied resource is not a valid stream resource
socket_set_block
Warning: socket_set_block(): unable to set blocking mode [10038]: %s
@@ -89,14 +100,11 @@ Warning: socket_get_option(): unable to retrieve socket option [10038]: %s
close socket
-stream_set_blocking
-Warning: stream_set_blocking(): supplied resource is not a valid stream resource in %s on line %d
+stream_set_blocking stream_set_blocking(): supplied resource is not a valid stream resource
-socket_set_block
-Warning: socket_set_block(): supplied resource is not a valid Socket resource in %s on line %d
+socket_set_block socket_set_block(): supplied resource is not a valid Socket resource
-socket_get_option
-Warning: socket_get_option(): supplied resource is not a valid Socket resource in %s on line %d
+socket_get_option socket_get_option(): supplied resource is not a valid Socket resource
Done.