[TYPO3-core] RFC #16849: fixPermissions* tests rely on availability of posix_getegid()

Christian Kuhn lolli at schwarzbu.ch
Wed Dec 29 23:17:27 CET 2010


On 12/26/2010 10:59 PM, Steffen Gebert wrote:
> Branches:
> 4-4, trunk
>
> Problem:
> The fixPermissions* tests in t3lib_divTest fail on my MacOS, as the
> function posix_getegid() is not available.
> For Windows environments, these tests are already skipped.
>
> Major problem is the first call to the undefined function causes a PHP
> error and no remaining tests are executed anymore.
>
> Solution:
> Skip tests, if function posix_getegid() is not available.

The patch is ok. I didn't like the fact that all permission check are 
skipped if posix_getegid() method was not available.

This is because the rule 'one assertion at a time pert test' was not 
respected for these tests.

I changed the patch a bit and removed all group checks from existing 
tests and added a new test which only checks group ownership. It is the 
only one which is skipped if the posix method is not available now.

* Committed to trunk rev. 9963
* Committed to 4.4 rev3 9964

Regards
Christian
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 16849_02.diff
Type: text/x-patch
Size: 6820 bytes
Desc: not available
URL: <http://lists.typo3.org/pipermail/typo3-team-core/attachments/20101229/4011d2f6/attachment-0001.bin>


More information about the TYPO3-team-core mailing list