[BUGFIX] Test in Configuration\ConfigurationManagerTest fails in backend 96/22896/3
authorNicole Cordes <typo3@cordes.co>
Tue, 6 Aug 2013 20:53:37 +0000 (22:53 +0200)
committerStefan Neufeind <typo3.neufeind@speedpartner.de>
Tue, 6 Aug 2013 22:07:15 +0000 (00:07 +0200)
When running the tests in the PHPUnit backend, the path of the current
working directory is typo3/ (where mod.php is included). Therefore the
test canWriteConfigurationReturnsTrueIfDirectoryAndFilesAreWritable
fails as it deals with paths relative to the root directory. We have to
use absolute paths to ensure files in typo3temp folder exist.

Resolves: #50845
Releases: 6.2, 6.1
Change-Id: I7859978c31cf523c8803316fdac8c067d00042cc
Reviewed-on: https://review.typo3.org/22896
Reviewed-by: Jigal van Hemert
Tested-by: Jigal van Hemert
Reviewed-by: Stefan Neufeind
Tested-by: Stefan Neufeind
typo3/sysext/core/Tests/Unit/Configuration/ConfigurationManagerTest.php

index 507e9f6..405c9ee 100644 (file)
@@ -417,19 +417,19 @@ class ConfigurationManagerTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
                $directory = 'typo3temp/' . uniqid('test_');
                $absoluteDirectory = PATH_site . $directory;
                mkdir($absoluteDirectory);
-               $fixture->_set('pathTypo3Conf', $directory);
+               $fixture->_set('pathTypo3Conf', $absoluteDirectory);
 
                $file1 = 'typo3temp/' . uniqid('test_');
                $absoluteFile1 = PATH_site . $file1;
                touch($absoluteFile1);
                $this->testFilesToDelete[] = $absoluteFile1;
-               $fixture->_set('localConfigurationFile', $file1);
+               $fixture->_set('localConfigurationFile', $absoluteFile1);
 
                $file2 = 'typo3temp/' . uniqid('test_');
                $absoluteFile2 = PATH_site . $file2;
                touch($absoluteFile2);
                $this->testFilesToDelete[] = $absoluteFile2;
-               $fixture->_set('localconfFile', $file2);
+               $fixture->_set('localconfFile', $absoluteFile2);
 
                clearstatcache();