summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnatoliy Belsky <ab@php.net>2012-04-10 10:57:10 (GMT)
committerAnatoliy Belsky <ab@php.net>2012-04-10 10:57:10 (GMT)
commit37cb29ae90b9efdde4081f783cdc56074847c0c7 (patch)
tree86b6cc4c4df1475a2a03cbe3077e82036adfba06
parentd80e2e069cd65a9e1c3bf5796ccc8616b625ac45 (diff)
downloadphp-37cb29ae90b9efdde4081f783cdc56074847c0c7.tar.gz
Fixed bug #61632 Test ext\sockets\tests\socket_create_listen.phpt fails
-rw-r--r--ext/sockets/tests/socket_create_listen-win32.phpt21
-rw-r--r--ext/sockets/tests/socket_create_listen.phpt3
2 files changed, 24 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 0000000..23bf963
--- /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
diff --git a/ext/sockets/tests/socket_create_listen.phpt b/ext/sockets/tests/socket_create_listen.phpt
index 440fade..76f2942 100644
--- a/ext/sockets/tests/socket_create_listen.phpt
+++ b/ext/sockets/tests/socket_create_listen.phpt
@@ -2,6 +2,9 @@
Test if socket binds on 31338
--SKIPIF--
<?php
+if (substr(PHP_OS, 0, 3) == 'WIN') {
+ die('skip.. Not valid for Windows');
+}
if (!extension_loaded('sockets')) {
die('SKIP The sockets extension is not loaded.');
}