Skip to content

Commit

Permalink
[TASK] Minor cleanup ContentObjectRenderer
Browse files Browse the repository at this point in the history
ContentObjectRenderer has some minor flaws. Also the functional tests have
some unused code.

Resolves: #86015
Releases: master
Change-Id: I9ed00b32f4c00de7b667ad72052a0b7032901313
Reviewed-on: https://review.typo3.org/58065
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Georg Ringer <georg.ringer@gmail.com>
Tested-by: Georg Ringer <georg.ringer@gmail.com>
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Tested-by: Wouter Wolters <typo3@wouterwolters.nl>
  • Loading branch information
bmack authored and wouter90 committed Aug 28, 2018
1 parent 1f88ac0 commit dfa283c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
Expand Up @@ -1426,7 +1426,7 @@ public function getAltParam($conf, $longDesc = true)
{
$altText = isset($conf['altText.']) ? trim($this->stdWrap($conf['altText'], $conf['altText.'])) : trim($conf['altText']);
$titleText = isset($conf['titleText.']) ? trim($this->stdWrap($conf['titleText'], $conf['titleText.'])) : trim($conf['titleText']);
if (isset($conf['longdescURL.']) && $this->getTypoScriptFrontendController()->config['config']['doctype'] != 'html5') {
if (isset($conf['longdescURL.']) && $this->getTypoScriptFrontendController()->config['config']['doctype'] !== 'html5') {
$longDescUrl = $this->typoLink_URL($conf['longdescURL.']);
} else {
$longDescUrl = trim($conf['longdescURL']);
Expand Down Expand Up @@ -4952,7 +4952,7 @@ public function getData($string, $fieldArray = null)
// field = backend_layout
// ifEmpty.data = levelfield:-2, backend_layout_next_level, slide
// ifEmpty.ifEmpty = default
$retVal = $GLOBALS['TSFE']->page['backend_layout'];
$retVal = $tsfe->page['backend_layout'];

// If it is set to "none" - don't use any
if ($retVal === '-1') {
Expand Down
Expand Up @@ -414,9 +414,8 @@ public function typolinkReturnsCorrectLinksForPages($linkText, $configuration, $

$typoScriptFrontendController = $this->getMockBuilder(TypoScriptFrontendController::class)
->setConstructorArgs([null, 1, 0])
->setMethods(['getDomainDataForPid'])
->setMethods(['dummy'])
->getMock();
$typoScriptFrontendController->expects($this->any())->method('getDomainDataForPid')->willReturn(null);
$typoScriptFrontendController->config = [
'config' => [],
];
Expand Down Expand Up @@ -473,9 +472,8 @@ public function typolinkReturnsCorrectLinkForSectionToHomePageWithUrlRewriting()

$typoScriptFrontendController = $this->getMockBuilder(TypoScriptFrontendController::class)
->setConstructorArgs([null, 1, 0])
->setMethods(['getDomainDataForPid'])
->setMethods(['dummy'])
->getMock();
$typoScriptFrontendController->expects($this->any())->method('getDomainDataForPid')->willReturn(null);
$typoScriptFrontendController->config = [
'config' => [],
];
Expand Down

0 comments on commit dfa283c

Please sign in to comment.