[TASK] Stabilize some tests if run as root
authorChristian Kuhn <lolli@schwarzbu.ch>
Sun, 2 Sep 2012 11:17:16 +0000 (13:17 +0200)
committerChristian Kuhn <lolli@schwarzbu.ch>
Sun, 2 Sep 2012 11:43:39 +0000 (13:43 +0200)
commit2ec10d9799a3c27cedf772adbcb7a9aca1d7137a
tree03f1a29dc70d891f2a999b6e364b62a36474c729
parentf2baaabbbe3510ce4c70ba49c723e44df5dc54a7
[TASK] Stabilize some tests if run as root

GeneralUtility::fixPermissions has a bug if createGroup is set to the id
of the root group (0), and does not set the correct group. This is fixed
with a more sophisticated test in fixPermissions to allow 0 as
valid group. Default for createGroup is empty string, so it is now
checked with isset and strlen > 0 if chgrp() should be applied.

Additionally, the FAL test permissionsAreCorrectlyRetrieved is splitted
to four tests, and two of them are skipped if the test is run on linux
as root.

Change-Id: Icd3bb5808fef195da8394a8fd9c2797f9f01e9aa
Resolves: #40523
Releases: 6.0
Reviewed-on: http://review.typo3.org/14288
Reviewed-by: Christian Kuhn
Tested-by: Christian Kuhn
tests/Unit/t3lib/file/Driver/LocalDriverTest.php
typo3/sysext/core/Classes/Utility/GeneralUtility.php
typo3/sysext/core/Tests/Unit/Utility/GeneralUtilityTest.php