[TASK] Remove check for posix_getegid returning -1 03/59403/3
authorStefanos Karasavvidis <sk@karasavvidis.gr>
Fri, 11 Jan 2019 09:56:31 +0000 (11:56 +0200)
committerAnja Leichsenring <aleichsenring@ab-softlab.de>
Fri, 11 Jan 2019 14:33:43 +0000 (15:33 +0100)
On MacOS posix_getegid does return a correct effective group id, so
the check can be removed. Windows systems are already excluded by
other checks.

Resolves: #87398
Releases: master, 9.5
Change-Id: Ic1bff8d11f9109806a61351d992bfd471ebd4a8d
Reviewed-on: https://review.typo3.org/59403
Reviewed-by: Mona Muzaffar <mona.muzaffar@gmx.de>
Tested-by: Mona Muzaffar <mona.muzaffar@gmx.de>
Tested-by: TYPO3com <noreply@typo3.com>
Reviewed-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Tested-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
typo3/sysext/core/Tests/Unit/Utility/GeneralUtilityTest.php

index 8f64619..58d7c87 100644 (file)
@@ -2426,9 +2426,6 @@ class GeneralUtilityTest extends UnitTestCase
         if (Environment::isWindows()) {
             $this->markTestSkipped(self::NO_FIX_PERMISSIONS_ON_WINDOWS);
         }
-        if (posix_getegid() === -1) {
-            $this->markTestSkipped('The fixPermissionsSetsGroup() is not available on Mac OS because posix_getegid() always returns -1 on Mac OS.');
-        }
         // Create and prepare test file
         $filename = $this->getVirtualTestDir() . '/' . $this->getUniqueId('test_');
         GeneralUtilityFilesystemFixture::writeFileToTypo3tempDir($filename, '42');
@@ -2756,10 +2753,6 @@ class GeneralUtilityTest extends UnitTestCase
             $this->markTestSkipped(self::NO_FIX_PERMISSIONS_ON_WINDOWS);
             return false;
         }
-        if (posix_getegid() === -1) {
-            $this->markTestSkipped('Function posix_getegid() returns -1, ' . $methodName . '() tests skipped');
-            return false;
-        }
         $groups = posix_getgroups();
         if (count($groups) <= 1) {
             $this->markTestSkipped($methodName . '() test cannot be done when the web server user is only member of 1 group.');