TYPO3 CMS  TYPO3_7-6
TYPO3\CMS\Frontend\Tests\Functional\Rendering\LocalizedContentRenderingTest Class Reference
Inheritance diagram for TYPO3\CMS\Frontend\Tests\Functional\Rendering\LocalizedContentRenderingTest:
TYPO3\CMS\Core\Tests\Functional\DataHandling\AbstractDataHandlerActionTestCase TYPO3\CMS\Core\Tests\FunctionalTestCase TYPO3\CMS\Core\Tests\BaseTestCase

Public Member Functions

 defaultLanguageConfigurationDataProvider ()
 
 onlyEnglishContentIsRenderedForDefaultLanguage ($typoScript, $sysLanguageMode, $sysLanguageContentOL)
 
 dutchDataProvider ()
 
 renderingOfDutchLanguage ($typoScript, array $visibleRecords, $sysLanguageMode, $sysLanguageContentOL)
 
 contentOnNonTranslatedPageDataProvider ()
 
 contentOnNonTranslatedPageGerman ($typoScript, array $visibleRecords, $pageTitle, $sysLanguageUid, $sysLanguageContent, $sysLanguageMode, $sysLanguageContentOL, $status='success')
 
 contentOnPartiallyTranslatedPageDataProvider ()
 
 contentOnPartiallyTranslatedPage ($typoScript, array $visibleHeaders, $sysLanguageMode, $sysLanguageContentOL)
 
- Public Member Functions inherited from TYPO3\CMS\Core\Tests\FunctionalTestCase
 importCSVDataSet ($path)
 

Public Attributes

const VALUE_PageId = 89
 
const TABLE_Content = 'tt_content'
 
const TABLE_Pages = 'pages'
 
- Public Attributes inherited from TYPO3\CMS\Core\Tests\Functional\DataHandling\AbstractDataHandlerActionTestCase
const VALUE_BackendUserId = 1
 

Protected Member Functions

 setUp ()
 
 getNonVisibleHeaders (array $visibleHeaders)
 
 getNonVisibleFileTitles (array $visibleTitles)
 
- Protected Member Functions inherited from TYPO3\CMS\Core\Tests\Functional\DataHandling\AbstractDataHandlerActionTestCase
 setUp ()
 
 tearDown ()
 
 getActionService ()
 
 importScenarioDataSet ($dataSetName)
 
 assertAssertionDataSet ($dataSetName)
 
 assertErrorLogEntries ()
 
 getRequestSectionHasRecordConstraint ()
 
 getRequestSectionDoesNotHaveRecordConstraint ()
 
 getRequestSectionStructureHasRecordConstraint ()
 
 getRequestSectionStructureDoesNotHaveRecordConstraint ()
 
- Protected Member Functions inherited from TYPO3\CMS\Core\Tests\FunctionalTestCase
 getInstanceIdentifier ()
 
 getInstancePath ()
 
 setUp ()
 
 getDatabaseConnection ()
 
 assertCSVDataSet ($path)
 
 assertInRecords (array $expectedRecord, array $actualRecords)
 
 getAllRecords ($tableName, $hasUidField=false)
 
 arrayToString (array $array)
 
 renderRecords (array $assertion, array $record)
 
 getDifferentFields (array $assertion, array $record)
 
 setUpFrontendRootPage ($pageId, array $typoScriptFiles=[])
 
 addTypoScriptToTemplateRecord ($pageId, $typoScript)
 
 getFrontendResponse ($pageId, $languageId=0, $backendUserId=0, $workspaceId=0, $failOnFailure=true, $frontendUserId=0)
 
- Protected Member Functions inherited from TYPO3\CMS\Core\Tests\BaseTestCase
 getAccessibleMock ( $originalClassName, $methods=[], array $arguments=[], $mockClassName='', $callOriginalConstructor=true, $callOriginalClone=true, $callAutoload=true)
 
 getAccessibleMockForAbstractClass ( $originalClassName, array $arguments=[], $mockClassName='', $callOriginalConstructor=true, $callOriginalClone=true, $callAutoload=true, $mockedMethods=[])
 
 buildAccessibleProxy ($className)
 
 callInaccessibleMethod ($object, $name)
 
 inject ($target, $name, $dependency)
 
 getUniqueId ($prefix='')
 

Protected Attributes

 $scenarioDataSetDirectory = 'typo3/sysext/frontend/Tests/Functional/Rendering/DataSet/'
 
 $configurationToUseInTestInstance
 
 $pathsToLinkInTestInstance
 
- Protected Attributes inherited from TYPO3\CMS\Core\Tests\Functional\DataHandling\AbstractDataHandlerActionTestCase
 $scenarioDataSetDirectory
 
 $assertionDataSetDirectory
 
 $expectedErrorLogEntries = 0
 
 $testExtensionsToLoad
 
 $pathsToLinkInTestInstance
 
 $recordIds = []
 
 $actionService
 
 $backendUser
 
- Protected Attributes inherited from TYPO3\CMS\Core\Tests\FunctionalTestCase
 $coreExtensionsToLoad = []
 
 $testExtensionsToLoad = []
 
 $pathsToLinkInTestInstance = []
 
 $configurationToUseInTestInstance = []
 
 $additionalFoldersToCreate = []
 
 $backendUserFixture = 'typo3/sysext/core/Tests/Functional/Fixtures/be_users.xml'
 
- Protected Attributes inherited from TYPO3\CMS\Core\Tests\BaseTestCase
 $backupGlobals = true
 
 $backupStaticAttributes = false
 

Detailed Description

Test case checking if localized tt_content is rendered correctly with different language settings

The following values are relevant:

– TypoScript – config.sys_language_uid = [0,1,2,3,4...] (set via the language parameter &L=1 from the FrontendRequest in the tests) Fetch the page overlay of the current page if the value is > 0 and if not available, then "config.sys_language_mode" is evaluated. If this setting is set to "0" or empty, then no page overlay is evaluated, and no further parameters are relevant or evaluated.

config.sys_language_mode = [strict, content_fallback;2,3, ignore] Only evaluated when sys_language_uid > 0, and the requested page translation is NOT available. Decides if "pageNotFound" (strict), "content_fallback" with a fallback chain ($TSFE->sys_language_content is set to that value) or "ignore" (just render the page and the content as this translation would exist). When set to "0" or not set "", this means that the page request is using the default language for content and page properties. Content fallback is evaluated on page level, not on the CE level. So it only makes a difference when the pages_language_overlay for the requested language does not exist.

config.sys_language_overlay = [0, 1, hideNonTranslated] Only relevant if $TSFE->sys_language_content is > 0. Sets the property $TSFE->sys_language_contentOL at a request. Further calls via $TSFE->sys_page->getRecordOverlay receive this value to see if an overlay should happen. 0: Just fetch records from selected ($TSFE->sys_language_content) language, no overlay will happen, no fetching of the records from the default language. This boils down to "free mode" language handling.

1: Fetch records from the default language and overlay them with translations. If some record is not translated default language version will be shown.

hideNotTranslated: Fetch records from the default language and overlay them with translations. If some record is not translated it will not be shown.

Frontend / TypoScriptFrontendController –

$TSFE->sys_language_uid Defines in which language the current page was requested, this is relevant when building menus or links to other pages. $TSFE->sys_language_content Contains the language UID of the content records that should be overlaid to would be fetched. This is especially useful when a page requested with language=4 should fall back to showing content of language=2 (see config.sys_language_mode=content_fallback) $TSFE->sys_language_contentOL Contains the info if and how record overlays (when fetching content) should be handled, either "0" (no overlays done) or "1" (do overlays with possible mixed content, or "hideNonTranslated". see "config.sys_language_overlay" This is used in conjunction with $TSFE->sys_language_content. $TSFE->sys_language_mode Contains the config.sys_language_mode parameter, which is either "", "strict", "content_fallback" or "ignore" Only used within $TSFE->settingLanguage() and in Extbase.

Definition at line 73 of file LocalizedContentRenderingTest.php.

Member Function Documentation

◆ contentOnNonTranslatedPageDataProvider()

TYPO3\CMS\Frontend\Tests\Functional\Rendering\LocalizedContentRenderingTest::contentOnNonTranslatedPageDataProvider ( )

Definition at line 646 of file LocalizedContentRenderingTest.php.

◆ contentOnNonTranslatedPageGerman()

TYPO3\CMS\Frontend\Tests\Functional\Rendering\LocalizedContentRenderingTest::contentOnNonTranslatedPageGerman (   $typoScript,
array  $visibleRecords,
  $pageTitle,
  $sysLanguageUid,
  $sysLanguageContent,
  $sysLanguageMode,
  $sysLanguageContentOL,
  $status = 'success' 
)

◆ contentOnPartiallyTranslatedPage()

TYPO3\CMS\Frontend\Tests\Functional\Rendering\LocalizedContentRenderingTest::contentOnPartiallyTranslatedPage (   $typoScript,
array  $visibleHeaders,
  $sysLanguageMode,
  $sysLanguageContentOL 
)

◆ contentOnPartiallyTranslatedPageDataProvider()

TYPO3\CMS\Frontend\Tests\Functional\Rendering\LocalizedContentRenderingTest::contentOnPartiallyTranslatedPageDataProvider ( )

Definition at line 1021 of file LocalizedContentRenderingTest.php.

◆ defaultLanguageConfigurationDataProvider()

TYPO3\CMS\Frontend\Tests\Functional\Rendering\LocalizedContentRenderingTest::defaultLanguageConfigurationDataProvider ( )

Definition at line 116 of file LocalizedContentRenderingTest.php.

◆ dutchDataProvider()

TYPO3\CMS\Frontend\Tests\Functional\Rendering\LocalizedContentRenderingTest::dutchDataProvider ( )

Dutch language has pages_language_overlay record and some content elements are translated

Returns
array

Definition at line 276 of file LocalizedContentRenderingTest.php.

◆ getNonVisibleFileTitles()

TYPO3\CMS\Frontend\Tests\Functional\Rendering\LocalizedContentRenderingTest::getNonVisibleFileTitles ( array  $visibleTitles)
protected

◆ getNonVisibleHeaders()

◆ onlyEnglishContentIsRenderedForDefaultLanguage()

◆ renderingOfDutchLanguage()

◆ setUp()

TYPO3\CMS\Frontend\Tests\Functional\Rendering\LocalizedContentRenderingTest::setUp ( )
protected

Member Data Documentation

◆ $configurationToUseInTestInstance

TYPO3\CMS\Frontend\Tests\Functional\Rendering\LocalizedContentRenderingTest::$configurationToUseInTestInstance
protected
Initial value:
= [
'FE' => [
'pageNotFound_handling' => 'READFILE:typo3/sysext/frontend/Tests/Functional/Rendering/DataSet/404Template.html'
]
]

Definition at line 90 of file LocalizedContentRenderingTest.php.

◆ $pathsToLinkInTestInstance

TYPO3\CMS\Frontend\Tests\Functional\Rendering\LocalizedContentRenderingTest::$pathsToLinkInTestInstance
protected
Initial value:
= [
'typo3/sysext/core/Tests/Functional/Fixtures/Frontend/AdditionalConfiguration.php' => 'typo3conf/AdditionalConfiguration.php'

Definition at line 99 of file LocalizedContentRenderingTest.php.

◆ $scenarioDataSetDirectory

TYPO3\CMS\Frontend\Tests\Functional\Rendering\LocalizedContentRenderingTest::$scenarioDataSetDirectory = 'typo3/sysext/frontend/Tests/Functional/Rendering/DataSet/'
protected

Definition at line 82 of file LocalizedContentRenderingTest.php.

◆ TABLE_Content

const TYPO3\CMS\Frontend\Tests\Functional\Rendering\LocalizedContentRenderingTest::TABLE_Content = 'tt_content'

Definition at line 76 of file LocalizedContentRenderingTest.php.

◆ TABLE_Pages

const TYPO3\CMS\Frontend\Tests\Functional\Rendering\LocalizedContentRenderingTest::TABLE_Pages = 'pages'

Definition at line 77 of file LocalizedContentRenderingTest.php.

◆ VALUE_PageId

const TYPO3\CMS\Frontend\Tests\Functional\Rendering\LocalizedContentRenderingTest::VALUE_PageId = 89

Definition at line 75 of file LocalizedContentRenderingTest.php.