diff options
-rw-r--r-- | ext/posix/tests/posix_getlogin_basic.phpt | 21 |
1 files changed, 9 insertions, 12 deletions
diff --git a/ext/posix/tests/posix_getlogin_basic.phpt b/ext/posix/tests/posix_getlogin_basic.phpt index bef46e9db0..4dd1131779 100644 --- a/ext/posix/tests/posix_getlogin_basic.phpt +++ b/ext/posix/tests/posix_getlogin_basic.phpt @@ -7,25 +7,22 @@ Rogerio Prado de Jesus <rogeriopradoj@gmail.com> Felipe Almeida <felipealmeida948@gmail.com> Ariana Kataoka <ariskataoka@gmail.com> Leonardo Gouveia <leogouv@gmail.com> -User Groups: PHPVale - PHPSP - PHPDF - PHP Women -Hangout presented by #phptestfestbrasil on 2017-11-14 -https://www.youtube.com/watch?v=bBWkzZEadNo +User Groups: PHPVale PHPSP PHPDF PHP Women --SKIPIF-- <?php if(!extension_loaded("posix")) die("skip - POSIX extension not loaded"); ?> --FILE-- <?php -$username = posix_getpwuid(posix_geteuid())['name']; +$getpwuid = posix_getpwuid(posix_geteuid())['name']; +$getlogin = posix_getlogin(); -if (posix_getlogin() == false) { - $username = false; +if ($getlogin === false || $getlogin === $getpwuid) { + echo "Success"; +} else { + echo "posix_getpwuid(): " . $getpwuid . "\n"; + echo "posix_getlogin(): " . $getlogin . "\n"; } - -var_dump($username == posix_getlogin()); ?> --EXPECT-- -bool(true) +Success |