Bug #22391
closedUnit test failures in t3lib_cache_backend_FileBackendTestCase with open_basedir = Off
0%
Description
Using the latest trunk, I get the following test failures:
Testsuite: t3lib_cache_backend_FileBackendTestCase
defaultCacheDirectoryIsWritable
! Failure in test case defaultCacheDirectoryIsWritable
File: /home/klee/eclipse/typo3_src/tests/t3lib/cache/backend/t3lib_cache_backend_filebackendtestcase.php
Line: 91:
Description
The default cache directory "typo3temp/cache/testing/" is not writable. Failed asserting that <boolean:false> is true.
getCacheDirectoryReturnsThePreviouslySetDirectory
! Failure in test case getCacheDirectoryReturnsThePreviouslySetDirectory
File: /home/klee/eclipse/typo3_src/tests/t3lib/cache/backend/t3lib_cache_backend_filebackendtestcase.php
Line: 118:
Description
getDirectory() did not return the expected value. Failed asserting that <string:typo3temp/cache/testing/> is equal to <string:/home/klee/public_html/formidable/typo3temp/cache/testing/>.
setReallySavesToTheSpecifiedDirectory
! Failure in test case setReallySavesToTheSpecifiedDirectory
File: /home/klee/eclipse/typo3_src/tests/t3lib/cache/backend/t3lib_cache_backend_filebackendtestcase.php
Line: 175:
Description
File does not exist. Failed asserting that <boolean:false> is true.
setOverwritesAnAlreadyExistingCacheEntryForTheSameIdentifier
! Failure in test case setOverwritesAnAlreadyExistingCacheEntryForTheSameIdentifier
File: /home/klee/eclipse/typo3_src/tests/t3lib/cache/backend/t3lib_cache_backend_filebackendtestcase.php
Line: 219:
Description
File does not exist. Failed asserting that <boolean:false> is true.
setReallySavesSpecifiedTags
! Failure in test case setReallySavesSpecifiedTags
File: /home/klee/eclipse/typo3_src/tests/t3lib/cache/backend/t3lib_cache_backend_filebackendtestcase.php
Line: 250:
Description
Tag directory UnitTestTag%tag1 does not exist. Failed asserting that <boolean:false> is true.
removeReallyRemovesACacheEntry
! Failure in test case removeReallyRemovesACacheEntry
File: /home/klee/eclipse/typo3_src/tests/t3lib/cache/backend/t3lib_cache_backend_filebackendtestcase.php
Line: 352:
Description
The cache entry does not exist. Failed asserting that <boolean:false> is true.
collectGarbageReallyRemovesAnExpiredCacheEntry
! Failure in test case collectGarbageReallyRemovesAnExpiredCacheEntry
File: /home/klee/eclipse/typo3_src/tests/t3lib/cache/backend/t3lib_cache_backend_filebackendtestcase.php
Line: 391:
Description
The cache entry does not exist. Failed asserting that <boolean:false> is true.
collectGarbageReallyRemovesAllExpiredCacheEntries
! Failure in test case collectGarbageReallyRemovesAllExpiredCacheEntries
File: /home/klee/eclipse/typo3_src/tests/t3lib/cache/backend/t3lib_cache_backend_filebackendtestcase.php
Line: 440:
Description
The cache entries do not exist. Failed asserting that <boolean:false> is true.
setWithUnlimitedLifetimeWritesCorrectEntry
! Failure in test case setWithUnlimitedLifetimeWritesCorrectEntry
File: /home/klee/eclipse/typo3_src/tests/t3lib/cache/backend/t3lib_cache_backend_filebackendtestcase.php
Line: 711:
Description
File not found. Failed asserting that <boolean:false> is true.
(issue imported from #M14019)
Updated by Oliver Klee over 14 years ago
These tests even fail when the (existing) directory is world-writable.
Updated by Oliver Klee over 14 years ago
If I change this ...:
public function setUp() {
$this->testingCacheDirectory = 'typo3temp/cache/testing/';
... to this ..:
$this->testingCacheDirectory = PATH_site . 'typo3temp/cache/testing/';
most of the tests work, but this one fails:
getCacheDirectoryReturnsThePreviouslySetDirectory
! Failure in test case getCacheDirectoryReturnsThePreviouslySetDirectory
File: /home/klee/eclipse/typo3_src/tests/t3lib/cache/backend/t3lib_cache_backend_filebackendtestcase.php
Line: 121:
Description
getDirectory() did not return the expected value. Failed asserting that <string:/home/klee/public_html/formidable/typo3temp/cache/testing/> is equal to <string:/home/klee/public_html/formidable//home/klee/public_html/formidable/typo3temp/cache/testing/>.
Actually, this test is just plain wrong, This function will return an absolute path if a relative path has been set.
However, setCacheDirectory somehow fails to change the relative path to an absolute one in my case.
Updated by Oliver Klee over 14 years ago
It looks like the function fails to append the document root if open_basedir is not active.
Updated by Christian Kuhn over 14 years ago
Is this still a problem for you with current trunk?
Updated by Chris topher over 14 years ago
Thanks for your feedback, Oliver!
Resolved, no longer reproducable.