[BUGFIX] Remove an erratic unit test 33/50433/3
authorChristian Kuhn <lolli@schwarzbu.ch>
Sat, 29 Oct 2016 13:02:37 +0000 (15:02 +0200)
committerAnja Leichsenring <aleichsenring@ab-softlab.de>
Sat, 29 Oct 2016 21:00:43 +0000 (23:00 +0200)
The permission tests tend to be erratic depending on the
environment. We can't control every detail and some of them
are skipped in various scenarios already.
They also don't provide *that* much value.

The patch removes one test that tends to fail depending on
access rights of parent directories.

Change-Id: I2406ea16f7f88867a9be21d6d561516bddcc2dec
Resolves: #78498
Releases: master
Reviewed-on: https://review.typo3.org/50433
Reviewed-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Tested-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
typo3/sysext/core/Tests/Unit/Configuration/ConfigurationManagerTest.php

index 375f9fc..a12ff76 100644 (file)
@@ -362,35 +362,6 @@ class ConfigurationManagerTest extends \TYPO3\CMS\Core\Tests\UnitTestCase
     /**
      * @test
      */
-    public function canWriteConfigurationReturnsFalseIfDirectoryIsNotWritable()
-    {
-        if (function_exists('posix_getegid') && posix_getegid() === 0) {
-            $this->markTestSkipped('Test skipped if run on linux as root');
-        } elseif (TYPO3_OS === 'WIN') {
-            $this->markTestSkipped('Not available on Windows as folders are always writable');
-        }
-        /** @var $subject \TYPO3\CMS\Core\Configuration\ConfigurationManager|\PHPUnit_Framework_MockObject_MockObject|\TYPO3\CMS\Core\Tests\AccessibleObjectInterface */
-        $subject = $this->getAccessibleMock(\TYPO3\CMS\Core\Configuration\ConfigurationManager::class, ['dummy']);
-
-        $directory = 'typo3temp/var/tests/' . $this->getUniqueId('test_');
-        $absoluteDirectory = PATH_site . $directory;
-        mkdir($absoluteDirectory);
-        chmod($absoluteDirectory, 0544);
-        clearstatcache();
-
-        $subject->_set('pathTypo3Conf', $directory);
-
-        $result = $subject->canWriteConfiguration();
-
-        chmod($absoluteDirectory, 0755);
-        rmdir($absoluteDirectory);
-
-        $this->assertFalse($result);
-    }
-
-    /**
-     * @test
-     */
     public function canWriteConfigurationReturnsFalseIfLocalConfigurationFileIsNotWritable()
     {
         if (function_exists('posix_getegid') && posix_getegid() === 0) {