mirror of
https://github.com/php/php-src.git
synced 2024-12-12 11:23:53 +08:00
Fixed bug #61632 Test ext\sockets\tests\socket_create_listen.phpt fails
This commit is contained in:
parent
d80e2e069c
commit
37cb29ae90
21
ext/sockets/tests/socket_create_listen-win32.phpt
Normal file
21
ext/sockets/tests/socket_create_listen-win32.phpt
Normal file
@ -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
|
@ -2,6 +2,9 @@
|
|||||||
Test if socket binds on 31338
|
Test if socket binds on 31338
|
||||||
--SKIPIF--
|
--SKIPIF--
|
||||||
<?php
|
<?php
|
||||||
|
if (substr(PHP_OS, 0, 3) == 'WIN') {
|
||||||
|
die('skip.. Not valid for Windows');
|
||||||
|
}
|
||||||
if (!extension_loaded('sockets')) {
|
if (!extension_loaded('sockets')) {
|
||||||
die('SKIP The sockets extension is not loaded.');
|
die('SKIP The sockets extension is not loaded.');
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user