diff options
Diffstat (limited to 'ext/posix')
-rw-r--r-- | ext/posix/tests/posix_getgrnam_basic.phpt | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/ext/posix/tests/posix_getgrnam_basic.phpt b/ext/posix/tests/posix_getgrnam_basic.phpt new file mode 100644 index 0000000000..8a26c4a19e --- /dev/null +++ b/ext/posix/tests/posix_getgrnam_basic.phpt @@ -0,0 +1,27 @@ +--TEST-- +Test posix_getgrnam() function : basic functionality +--SKIPIF-- +<?php + if (!extension_loaded('posix')) die('skip - POSIX extension not loaded'); +?> +--FILE-- +<?php + $groupid = posix_getgroups()[0]; + $group = posix_getgrgid($groupid); + $groupinfo = posix_getgrnam($group["name"]); + var_dump($groupinfo); + $groupinfo = posix_getgrnam(""); + var_dump($groupinfo); +?> +--EXPECTF-- +array(4) { + ["name"]=> + string(%d) "%s" + ["passwd"]=> + string(1) "%s" + ["members"]=> +%a + ["gid"]=> + int(%d) +} +bool(false) |