Issue Bug Closed

#51476Unittest "headerAndFooterMarkersAreReplacedDuringIntProcessing" fails

Markus Klein 08/28/13, 20:37 updated 01/19/15, 02:31

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.

Reviews 0

No change resolves or names this issue in its commit message, and no comment links one.