Bug #23262 ยป fix-unit-test-filebackend.diff
tests/t3lib/cache/backend/t3lib_cache_backend_filebackendTest.php (Arbeitskopie) | ||
---|---|---|
*/
|
||
public function getCacheDirectoryReturnsTheCurrentCacheDirectory() {
|
||
$directory = $this->testingCacheDirectory;
|
||
$fullPathToDirectory = t3lib_div::getIndpEnv('TYPO3_DOCUMENT_ROOT') . '/' . $directory;
|
||
$fullPathToDirectory = PATH_site . $directory;
|
||
$this->backend->setCacheDirectory($directory);
|
||
$this->assertEquals($fullPathToDirectory, $this->backend->getCacheDirectory(), 'getCacheDirectory() did not return the expected value.');
|
||
... | ... | |
$mockCache->expects($this->atLeastOnce())->method('getIdentifier')->will($this->returnValue('UnitTestCache'));
|
||
$backend = $this->getMock('t3lib_cache_backend_FileBackend', array('isCacheFileExpired'), array(), '', FALSE);
|
||
$fullPathToCacheFile = t3lib_div::getIndpEnv('TYPO3_DOCUMENT_ROOT') . '/typo3temp/cache/UnitTestCache/ExpiredEntry';
|
||
$fullPathToCacheFile = PATH_site . 'typo3temp/cache/UnitTestCache/ExpiredEntry';
|
||
$backend->expects($this->once())->method('isCacheFileExpired')->with($fullPathToCacheFile)->will($this->returnValue(TRUE));
|
||
$backend->setCache($mockCache);
|
||