Skip to content
This repository was archived by the owner on Aug 24, 2021. It is now read-only.
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions ext/posix/tests/posix_getpwnam_basic_01.phpt
Original file line number Diff line number Diff line change
@@ -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====