diff options
author | Peter Kokot <peterkokot@gmail.com> | 2019-02-14 20:28:35 +0100 |
---|---|---|
committer | Peter Kokot <peterkokot@gmail.com> | 2019-02-14 20:28:35 +0100 |
commit | cb74d28356d9d0bd85fd1de5f6cc0a5b04fcb9d9 (patch) | |
tree | 2c40ab4a55ef0227d6eabbdf522d45f5478b3fb4 /ext/posix | |
parent | d92535d81f754eece9d04153b66bbaaa13fe93b2 (diff) | |
parent | 4411cb66567f72e373cc481654de61f732e08af0 (diff) | |
download | php-git-cb74d28356d9d0bd85fd1de5f6cc0a5b04fcb9d9.tar.gz |
Merge branch 'PHP-7.4'
* PHP-7.4:
Add basic test for posix getgrnam
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) |