We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4411cb6 commit 2c90beaCopy full SHA for 2c90bea
ext/posix/tests/posix_getpwnam_basic_01.phpt
@@ -0,0 +1,28 @@
1
+--TEST--
2
+Test posix_getpwnam() function : basic functionality
3
+--CREDITS--
4
+Rodrigo Prado de Jesus <royopa [at] gmail [dot] com>
5
+User Group: PHPSP #phptestfestbrasil
6
+--SKIPIF--
7
+<?php
8
+ if (!extension_loaded('posix')) die('skip - POSIX extension not loaded');
9
+?>
10
+--FILE--
11
12
+ $uid = posix_geteuid();
13
+ $user = posix_getpwuid($uid);
14
+ print_r(posix_getpwnam($user['name']));
15
16
+===DONE====
17
+--EXPECTREGEX--
18
+Array
19
+\(
20
+ \[name\] => [^\r\n]+
21
+ \[passwd\] => [^\r\n]+
22
+ \[uid\] => [0-9]+
23
+ \[gid\] => [0-9]+
24
+ \[gecos\] => [^\r\n]*
25
+ \[dir\] => [^\r\n]+
26
+ \[shell\] => [^\r\n]+
27
+\)
28
0 commit comments