1
0
mirror of https://github.com/php/php-src.git synced 2026-04-11 10:03:18 +02:00
Files
archived-php-src/ext/sockets/tests/socket_create_pair-wrongparams-win32.phpt
Máté Kocsis d1764ca330 Make error messages more consistent by fixing capitalization
Closes GH-5066 As a first step, let's capitalize their initial letter when it is applicable.
2020-01-17 14:52:46 +01:00

30 lines
799 B
PHP

--TEST--
Test parameter handling in socket_create_pair()
--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
var_dump(socket_create_pair(AF_INET, null, null, $sockets));
var_dump(socket_create_pair(31337, null, null, $sockets));
var_dump(socket_create_pair(AF_INET, 31337, 0, $sockets));
--EXPECTF--
bool(true)
Warning: socket_create_pair(): Invalid socket domain [31337] specified for argument 1, assuming AF_INET in %s on line %d
bool(true)
Warning: socket_create_pair(): Invalid socket type [31337] specified for argument 2, assuming SOCK_STREAM in %s on line %d
bool(true)
--CREDITS--
Till Klampaeckel, till@php.net
Berlin TestFest 2009