Project

General

Profile

Actions

Bug #51476

closed

Unittest "headerAndFooterMarkersAreReplacedDuringIntProcessing" fails

Added by Markus Klein about 11 years ago. Updated almost 10 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Tests
Target version:
-
Start date:
2013-08-28
Due date:
% Done:

0%

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

Description

Unittest frontend\headerAndFooterMarkersAreReplacedDuringIntProcessing() fails with error:

filemtime(): stat failed for /var/www/html/master/typo3/typo3/contrib/extjs/adapter/ext/ext-base.js

The "typo3/" path segment is present twice.

The tests are run via PHPunit extension in the BE.

The reason seems to be that the PageRenderer is initialized inaccurately.

TypoScriptFrontendController 
public function getPageRenderer() {
    if (!isset($this->pageRenderer)) {
        $this->pageRenderer = GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Page\\PageRenderer');
        $this->pageRenderer->setTemplateFile(PATH_tslib . 'templates/tslib_page_frontend.html');
        $this->pageRenderer->setBackPath(TYPO3_mainDir);
    }
    return $this->pageRenderer;
}

Debugging the PageRenderer it can be seen that the member $backPath is usually an empty string. But when running the test case the $backPath is set to typo3/

Maybe there has to be additional mocking for this to work.

Actions #1

Updated by Markus Klein about 11 years ago

  • Is Regression set to No
Actions #2

Updated by Mathias Schreiber almost 10 years ago

  • Status changed from New to Closed

Is this fixed?
I don't get the error at all.
If closed by error, please re-open

Actions #3

Updated by Markus Klein almost 10 years ago

This was somehow related to phpunit ext. Since tests are running now via CLI exclusively closing this issue seems correct. Thanks.

Actions

Also available in: Atom PDF