File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -837,6 +837,8 @@ private function getFilePermisions($filePath)
837837
838838 private  function  getFileOwner ($ filepath )
839839 {
840+  $ this  ->markAsSkippedIfPosixIsMissing ();
841+ 
840842 $ infos  = stat ($ filepath );
841843 if  ($ datas  = posix_getpwuid ($ infos ['uid ' ])) {
842844 return  $ datas ['name ' ];
@@ -845,6 +847,8 @@ private function getFileOwner($filepath)
845847
846848 private  function  getFileGroup ($ filepath )
847849 {
850+  $ this  ->markAsSkippedIfPosixIsMissing ();
851+ 
848852 $ infos  = stat ($ filepath );
849853 if  ($ datas  = posix_getgrgid ($ infos ['gid ' ])) {
850854 return  $ datas ['name ' ];
@@ -867,8 +871,8 @@ private function markAsSkippedIfChmodIsMissing()
867871
868872 private  function  markAsSkippedIfPosixIsMissing ()
869873 {
870-  if  (defined ('PHP_WINDOWS_VERSION_MAJOR ' )) {
871-  $ this  ->markTestSkipped ('Posix uids are  not available on windows  ' );
874+  if  (defined ('PHP_WINDOWS_VERSION_MAJOR ' ) || ! function_exists ( ' posix_isatty ' ) ) {
875+  $ this  ->markTestSkipped ('Posix is  not supported  ' );
872876 }
873877 }
874878}
                                 You can’t perform that action at this time. 
               
                  
0 commit comments