Skip to content

Commit

Permalink
Create posix_getpwnam_basic_01.phpt
Browse files Browse the repository at this point in the history
User Group: PHPSP #phptestfestbrasil
  • Loading branch information
royopa authored and petk committed Feb 14, 2019
1 parent 4411cb6 commit 2c90bea
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions ext/posix/tests/posix_getpwnam_basic_01.phpt
@@ -0,0 +1,28 @@
--TEST--
Test posix_getpwnam() function : basic functionality
--CREDITS--
Rodrigo Prado de Jesus <royopa [at] gmail [dot] com>
User Group: PHPSP #phptestfestbrasil
--SKIPIF--
<?php
if (!extension_loaded('posix')) die('skip - POSIX extension not loaded');
?>
--FILE--
<?php
$uid = posix_geteuid();
$user = posix_getpwuid($uid);
print_r(posix_getpwnam($user['name']));
?>
===DONE====
--EXPECTREGEX--
Array
\(
\[name\] => [^\r\n]+
\[passwd\] => [^\r\n]+
\[uid\] => [0-9]+
\[gid\] => [0-9]+
\[gecos\] => [^\r\n]*
\[dir\] => [^\r\n]+
\[shell\] => [^\r\n]+
\)
===DONE====

0 comments on commit 2c90bea

Please sign in to comment.