Project

General

Profile

Actions

Bug #23262

closed

unittest in tests/t3lib/cache/backend/t3lib_cache_backend_filebackendTest.php fails if installed in subdir of document_root

Added by Philipp Gampe almost 14 years ago. Updated over 5 years ago.

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

0%

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

Description

The unittest fail, because t3lib_div::getIndpEnv('TYPO3_DOCUMENT_ROOT') does not return right path.

Solution, use PATH_site instead.

Install TYPO3 inside a subdir
Run unittest "tests/t3lib/cache/backend/t3lib_cache_backend_filebackendTest.php"
See two errors

Apply path and see errors go away

This is the exact failure:

Get cache directory returns the current cache directory
! Failure in test case getCacheDirectoryReturnsTheCurrentCacheDirectory
File: /home/spieler/t3_playground/t3_trunk/tests/t3lib/cache/backend/t3lib_cache_backend_filebackendTest.php
Line: 118:
Description
getCacheDirectory() did not return the expected value. Failed asserting that <string:/opt/lampp/htdocs/t3_playground/dummy/typo3temp/cache/testing/> is equal to <string:/opt/lampp/htdocs/typo3temp/cache/testing/>.
Memory leak: 34 KB Time: 0.0142 sec.
Get returns false for expired entries
! Failure in test case getReturnsFalseForExpiredEntries
File: /home/spieler/svn/phpunit/PHPUnit-3.4.12/PHPUnit/Framework/MockObject/InvocationMocker.php
Line: 151:
Description
Expectation failed for method name is equal to <string:isCacheFileExpired> when invoked 1 time(s) Parameter 0 for invocation t3lib_cache_backend_FileBackend::isCacheFileExpired(<string:/opt/la...edEntry>) does not match expected value. Failed asserting that <string:/opt/lampp/htdocs/t3_playground/dummy/typo3temp/cache/UnitTestCache/ExpiredEntry> is equal to <string:/opt/lampp/htdocs/typo3temp/cache/UnitTestCache/ExpiredEntry>.
Memory leak: 60 KB Time: 0.0261 sec.
(issue imported from #M15224)

Files

fix-unit-test-filebackend.diff (1.37 KB) fix-unit-test-filebackend.diff Administrator Admin, 2010-07-24 20:05

Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Bug #16335: t3lib_div::getIndpEnv('TYPO3_DOCUMENT_ROOT') delivers wrong value in BackendClosedSteffen Kamper2006-07-11

Actions
Actions #1

Updated by Philipp Gampe over 13 years ago

please close this one ... it was solved with #16335

Actions #2

Updated by Christian Kuhn over 13 years ago

Resolved, no change required, solved with #16335.

Thanks Philipp for your update message!

Actions #3

Updated by Benni Mack over 5 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF