[BUGFIX][TESTS] Fix unit test fixPermissionsSetsPermissionsWithRelativeFileReference
authorSteffen Gebert <steffen.gebert@typo3.org>
Thu, 28 Apr 2011 16:38:02 +0000 (18:38 +0200)
committerChristian Kuhn <lolli@schwarzbu.ch>
Fri, 29 Apr 2011 11:14:06 +0000 (13:14 +0200)
The test fixPermissionsSetsPermissionsWithRelativeFileReference
(t3lib_divTest) used a (wrong) relative path to a test file in the chmod
call. Thus the test failed.

Prepend PATH_site have the correct absolute path.

Change-Id: Ifab5649272952a626381e8562ca018d087efc789
Resolves: #26423
Reviewed-on: http://review.typo3.org/1780
Reviewed-by: Peter Beernink
Reviewed-by: Christian Kuhn
Tested-by: Christian Kuhn
tests/t3lib/class.t3lib_divTest.php

index 5044174..fe41d95 100644 (file)
@@ -1897,7 +1897,7 @@ class t3lib_divTest extends tx_phpunit_testcase {
 
                $filename = 'typo3temp/' . uniqid('test_');
                t3lib_div::writeFileToTypo3tempDir(PATH_site . $filename, '42');
 
                $filename = 'typo3temp/' . uniqid('test_');
                t3lib_div::writeFileToTypo3tempDir(PATH_site . $filename, '42');
-               chmod($filename, 0742);
+               chmod(PATH_site . $filename, 0742);
 
                        // Set target permissions and run method
                $GLOBALS['TYPO3_CONF_VARS']['BE']['fileCreateMask'] = '0660';
 
                        // Set target permissions and run method
                $GLOBALS['TYPO3_CONF_VARS']['BE']['fileCreateMask'] = '0660';