summaryrefslogtreecommitdiff
path: root/ext/sockets/tests/socket_create_listen-win32.phpt
diff options
context:
space:
mode:
authorAnatoliy Belsky <ab@php.net>2012-04-10 12:57:10 +0200
committerAnatoliy Belsky <ab@php.net>2012-04-10 13:05:37 +0200
commit63ed8eb0a5264f3388b3ce0ba10bff7cd856ed7d (patch)
tree23b11068174bc70841628cbe77a8f203953ab1a4 /ext/sockets/tests/socket_create_listen-win32.phpt
parente33d209076e55a367b8a78cbf4bce7e4f1e08d20 (diff)
downloadphp-git-63ed8eb0a5264f3388b3ce0ba10bff7cd856ed7d.tar.gz
Fixed bug #61632 Test ext\sockets\tests\socket_create_listen.phpt fails
Diffstat (limited to 'ext/sockets/tests/socket_create_listen-win32.phpt')
-rw-r--r--ext/sockets/tests/socket_create_listen-win32.phpt21
1 files changed, 21 insertions, 0 deletions
diff --git a/ext/sockets/tests/socket_create_listen-win32.phpt b/ext/sockets/tests/socket_create_listen-win32.phpt
new file mode 100644
index 0000000000..23bf963c5f
--- /dev/null
+++ b/ext/sockets/tests/socket_create_listen-win32.phpt
@@ -0,0 +1,21 @@
+--TEST--
+Test if socket binds on 31338
+--SKIPIF--
+<?php
+if (substr(PHP_OS, 0, 3) != 'WIN') {
+ die('skip.. Not valid for non Windows');
+}
+if (!extension_loaded('sockets')) {
+ die('SKIP The sockets extension is not loaded.');
+}
+--FILE--
+<?php
+$sock = socket_create_listen(31338);
+socket_getsockname($sock, $addr, $port);
+var_dump($addr, $port);
+--EXPECT--
+string(9) "127.0.0.1"
+int(31338)
+--CREDITS--
+Till Klampaeckel, till@php.net
+PHP Testfest Berlin 2009-05-09