php-src/ext/posix/tests/posix_getpwnam_basic_01.phpt
Nikita Popov 7485978339
Migrate SKIPIF -> EXTENSIONS (#7138)
This is an automated migration of most SKIPIF extension_loaded checks.
2021-06-11 11:57:42 +02:00

30 lines
562 B
PHP

--TEST--
Test posix_getpwnam() function : basic functionality
--CREDITS--
Rodrigo Prado de Jesus <royopa [at] gmail [dot] com>
User Group: PHPSP #phptestfestbrasil
--EXTENSIONS--
posix
--FILE--
<?php
$uid = posix_geteuid();
$user = posix_getpwuid($uid);
$username = $user['name'];
$info = posix_getpwnam($username);
print_r($info);
var_dump($username == $info['name']);
?>
===DONE====
--EXPECTF--
Array
(
[name] => %s
[passwd] => %S
[uid] => %d
[gid] => %d
[gecos] => %S
[dir] => %s
[shell] => %s
)
bool(true)
===DONE====