mirror of
https://github.com/php/php-src.git
synced 2026-04-12 18:43:37 +02:00
Skip getprotobyname() and getprotobynumber() tests on *nix if there is no /etc/protocols file. Closes GH-6193.
17 lines
360 B
PHP
17 lines
360 B
PHP
--TEST--
|
|
getprotobynumber function basic test
|
|
--CREDITS--
|
|
edgarsandi - <edgar.r.sandi@gmail.com>
|
|
--SKIPIF--
|
|
<?php
|
|
if(in_array(PHP_OS_FAMILY, ['BSD', 'Darwin', 'Solaris', 'Linux'])){
|
|
if (!file_exists("/etc/protocols")) die("skip reason: missing /etc/protocols");
|
|
}
|
|
?>
|
|
--FILE--
|
|
<?php
|
|
var_dump(getprotobynumber(6));
|
|
?>
|
|
--EXPECT--
|
|
string(3) "tcp"
|