com php-src: Fixed bug #61632 Test ext\sockets\tests\sock et_create_listen.phpt fails: ext/sockets/tests/sock et_create_listen-win32.phpt
ext/sockets/tests/socke t_create_listen.phpt
| From: | Anatoliy Belsky | Date: | Tue, 10 Apr 2012 10:57:10 +0000 |
| Subject: | com php-src: Fixed bug #61632 Test ext\sockets\tests\sock et_create_listen.phpt fails: ext/sockets/tests/sock et_create_listen-win32.phpt ext/sockets/tests/socke t_create_listen.phpt |
||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-68716@lists.php.net to get a copy of this message | ||
Commit: 37cb29ae90b9efdde4081f783cdc56074847c0c7
Author: Anatoliy Belsky <ab@php.net> Tue, 10 Apr 2012 12:57:10 +0200
Parents: d80e2e069cd65a9e1c3bf5796ccc8616b625ac45
Branches: PHP-5.3 PHP-5.4 master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=37cb29ae90b9efdde4081f783cdc56074847c0c7
Log:
Fixed bug #61632 Test ext\sockets\tests\socket_create_listen.phpt fails
Bugs:
https://bugs.php.net/61632
Changed paths:
A ext/sockets/tests/socket_create_listen-win32.phpt
M ext/sockets/tests/socket_create_listen.phpt
Diff:
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.');
}