hide implementation details in tests

This commit is contained in:
Joe Watkins 2016-05-02 22:16:56 +01:00
parent 5e10735d07
commit 1b5a005367
3 changed files with 8 additions and 8 deletions

View File

@ -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)

View File

@ -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)

View File

@ -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)