Project

General

Profile

Actions

Bug #22391

closed

Unit test failures in t3lib_cache_backend_FileBackendTestCase with open_basedir = Off

Added by Oliver Klee over 14 years ago. Updated about 6 years ago.

Status:
Closed
Priority:
Should have
Assignee:
Category:
Caching
Target version:
-
Start date:
2010-04-07
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
4.4
PHP Version:
5.2
Tags:
Complexity:
Is Regression:
Sprint Focus:

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)

Actions #1

Updated by Oliver Klee over 14 years ago

These tests even fail when the (existing) directory is world-writable.

Actions #2

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.

Actions #3

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.

Actions #4

Updated by Christian Kuhn over 14 years ago

Is this still a problem for you with current trunk?

Actions #5

Updated by Oliver Klee over 14 years ago

No, this now works for me.

Actions #6

Updated by Chris topher over 14 years ago

Thanks for your feedback, Oliver!

Resolved, no longer reproducable.

Actions #7

Updated by Benni Mack about 6 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF