1--TEST--
2Test posix_getpwnam() function : basic functionality
3--CREDITS--
4Rodrigo Prado de Jesus <royopa [at] gmail [dot] com>
5User Group: PHPSP #phptestfestbrasil
6--SKIPIF--
7<?php
8    if (!extension_loaded('posix')) die('skip - POSIX extension not loaded');
9?>
10--FILE--
11<?php
12  $uid = posix_geteuid();
13  $user = posix_getpwuid($uid);
14  $username = $user['name'];
15  $info = posix_getpwnam($username);
16  print_r($info);
17  var_dump($username == $info['name']);
18?>
19===DONE====
20--EXPECTREGEX--
21Array
22\(
23    \[name\] => [^\r\n]+
24    \[passwd\] => [^\r\n]+
25    \[uid\] => [0-9]+
26    \[gid\] => [0-9]+
27    \[gecos\] => [^\r\n]*
28    \[dir\] => [^\r\n]+
29    \[shell\] => [^\r\n]+
30\)
31bool\(true\)
32===DONE====
33