Skip to content

Commit

Permalink
Fixed bug #61635 ext\sockets\tests\socket_select-wrongparams-1.phpt
Browse files Browse the repository at this point in the history
  • Loading branch information
weltling committed Apr 10, 2012
1 parent b2bc9c4 commit 882a3cf
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 5 deletions.
25 changes: 25 additions & 0 deletions ext/sockets/tests/socket_select-wrongparams-1-win32.phpt
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
--TEST--
Test parameter handling in socket_select().
--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
$sockets = array();
$domain = AF_INET;
socket_create_pair($domain, SOCK_STREAM, 0, $sockets);

$write = null;
$except = null;
$time = -1;
var_dump(socket_select($sockets, $write, $except, $time));
--EXPECTF--
int(0)
--CREDITS--
Till Klampaeckel, [email protected]
Berlin TestFest 2009
9 changes: 4 additions & 5 deletions ext/sockets/tests/socket_select-wrongparams-1.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,16 @@
Test parameter handling in socket_select().
--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.');
}
--FILE--
<?php
$sockets = array();
if (strtolower(substr(PHP_OS, 0, 3)) == 'win') {
$domain = AF_INET;
} else {
$domain = AF_UNIX;
}
$domain = AF_UNIX;
socket_create_pair($domain, SOCK_STREAM, 0, $sockets);

$write = null;
Expand Down

0 comments on commit 882a3cf

Please sign in to comment.