Fixed bug #61632 Test ext\sockets\tests\socket_create_listen.phpt fails

This commit is contained in:
Anatoliy Belsky 2012-04-10 12:57:10 +02:00
parent d80e2e069c
commit 37cb29ae90
2 changed files with 24 additions and 0 deletions

View 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

View File

@ -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.');
} }