mirror of
https://github.com/php/php-src.git
synced 2024-11-28 04:14:26 +08:00
hide implementation details in tests
This commit is contained in:
parent
5e10735d07
commit
1b5a005367
@ -16,7 +16,7 @@ $stream = stream_socket_client(
|
||||
$socket =
|
||||
socket_import_stream($stream);
|
||||
|
||||
var_dump(socket_get_option($socket, SOL_TCP, TCP_NODELAY));
|
||||
var_dump(socket_get_option($socket, SOL_TCP, TCP_NODELAY) > 0);
|
||||
?>
|
||||
--EXPECT--
|
||||
int(1)
|
||||
bool(true)
|
||||
|
@ -15,7 +15,7 @@ $stream = fopen("http://www.php.net", "r", false, $ctxt);
|
||||
$socket =
|
||||
@socket_import_stream($stream);
|
||||
|
||||
var_dump(socket_get_option($socket, STREAM_IPPROTO_TCP, TCP_NODELAY));
|
||||
var_dump(socket_get_option($socket, STREAM_IPPROTO_TCP, TCP_NODELAY) > 0);
|
||||
?>
|
||||
--EXPECT--
|
||||
int(1)
|
||||
bool(true)
|
||||
|
@ -18,11 +18,11 @@ $serverCode = <<<'CODE'
|
||||
|
||||
var_dump(socket_get_option(
|
||||
socket_import_stream($server),
|
||||
SOL_TCP, TCP_NODELAY));
|
||||
SOL_TCP, TCP_NODELAY) > 0);
|
||||
|
||||
var_dump(socket_get_option(
|
||||
socket_import_stream($client),
|
||||
SOL_TCP, TCP_NODELAY));
|
||||
SOL_TCP, TCP_NODELAY) > 0);
|
||||
|
||||
fclose($client);
|
||||
fclose($server);
|
||||
@ -43,5 +43,5 @@ include sprintf(
|
||||
ServerClientTestCase::getInstance()->run($serverCode, $clientCode);
|
||||
?>
|
||||
--EXPECT--
|
||||
int(0)
|
||||
int(1)
|
||||
bool(false)
|
||||
bool(true)
|
||||
|
Loading…
Reference in New Issue
Block a user