Skip getprotobyname() and getprotobynumber() tests on *nix if there
is no /etc/protocols file.
Closes GH-6193.
getprotobyname 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(getprotobyname('tcp'));
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));