ZF-3147: Unit test failures on Linux when run as root


Results from PHP 5.2.5 on Linux (run as root):

2) testSleepWakeRemoved(Zend_Mail_MboxTest)
no exception while waking with non readable file

3) testNotReadableFolder(Zend_Mail_MboxFolderTest)
no exception while loading invalid dir with subfolder not readable


Please evaluate and categorize/assign as necessary.

I don't know if the tests should run as root, but there might be a situation where you have to.

The problem is the code checks after an unserialize if the file can still be read and as root can always read everything we can't test the error handling.

I thought of the three possibilities, two of them are dropping privileges and forking and dropping. Both are things that should be solved in the TestHelper if we want everything to work as root. Now the test is just marked as skipped if it fails and you're root.

Of course the test could still fail if you have a different superuser with an userid != 0. But that might not be the best user to test as your webserver or mail scripts shouldn't run as that user.

Updating for the 1.6.0 release.