TYPO3 CMS  TYPO3_6-2
TYPO3\CMS\Extbase\Tests\Unit\Utility\LocalizationUtilityTest Class Reference
Inheritance diagram for TYPO3\CMS\Extbase\Tests\Unit\Utility\LocalizationUtilityTest:
TYPO3\CMS\Core\Tests\UnitTestCase TYPO3\CMS\Core\Tests\BaseTestCase

Public Member Functions

 setUp ()
 
 tearDown ()
 
 implodeTypoScriptLabelArrayWorks ()
 
 translateForEmptyStringKeyReturnsNull ()
 
 translateForEmptyStringKeyWithArgumentsReturnsNull ()
 
 translateDataProvider ()
 
 translateTest ($key, array $LOCAL_LANG, $languageKey, $expected, array $altLanguageKeys=array(), array $arguments=NULL)
 
 loadTypoScriptLabelsProvider ()
 
 loadTypoScriptLabels (array $LOCAL_LANG, array $typoScriptLocalLang, $languageKey, array $expected)
 
 clearLabelWithTypoScript ()
 

Protected Attributes

 $configurationManagerMock
 
 $LOCAL_LANG
 
- Protected Attributes inherited from TYPO3\CMS\Core\Tests\UnitTestCase
 $backupGlobalsBlacklist = array('TYPO3_LOADED_EXT')
 
- Protected Attributes inherited from TYPO3\CMS\Core\Tests\BaseTestCase
 $backupGlobals = TRUE
 
 $backupStaticAttributes = FALSE
 

Additional Inherited Members

- Protected Member Functions inherited from TYPO3\CMS\Core\Tests\UnitTestCase
 tearDown ()
 
- Protected Member Functions inherited from TYPO3\CMS\Core\Tests\BaseTestCase
 getAccessibleMock ( $originalClassName, array $methods=array(), array $arguments=array(), $mockClassName='', $callOriginalConstructor=TRUE, $callOriginalClone=TRUE, $callAutoload=TRUE)
 
 getAccessibleMockForAbstractClass ( $originalClassName, array $arguments=array(), $mockClassName='', $callOriginalConstructor=TRUE, $callOriginalClone=TRUE, $callAutoload=TRUE)
 
 buildAccessibleProxy ($className)
 
 callInaccessibleMethod ($object, $name)
 
 inject ($target, $name, $dependency)
 
 getUniqueId ($prefix='')
 

Detailed Description

Test case

Definition at line 22 of file LocalizationUtilityTest.php.

Member Function Documentation

◆ clearLabelWithTypoScript()

TYPO3\CMS\Extbase\Tests\Unit\Utility\LocalizationUtilityTest::clearLabelWithTypoScript ( )

◆ implodeTypoScriptLabelArrayWorks()

TYPO3\CMS\Extbase\Tests\Unit\Utility\LocalizationUtilityTest::implodeTypoScriptLabelArrayWorks ( )
Test:
Author
Sebastian Kurfürst sebas.nosp@m.tian.nosp@m.@typo.nosp@m.3.or.nosp@m.g

Definition at line 188 of file LocalizationUtilityTest.php.

References $result.

◆ loadTypoScriptLabels()

TYPO3\CMS\Extbase\Tests\Unit\Utility\LocalizationUtilityTest::loadTypoScriptLabels ( array  $LOCAL_LANG,
array  $typoScriptLocalLang,
  $languageKey,
array  $expected 
)

Tests whether labels from xml are overwritten by TypoScript labels

Parameters
array$LOCAL_LANG
array$typoScriptLocalLang
string$languageKey
array$expected
Returns
void loadTypoScriptLabelsProvider
Test:

Definition at line 392 of file LocalizationUtilityTest.php.

References $result, and TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface\CONFIGURATION_TYPE_FRAMEWORK.

◆ loadTypoScriptLabelsProvider()

TYPO3\CMS\Extbase\Tests\Unit\Utility\LocalizationUtilityTest::loadTypoScriptLabelsProvider ( )
Returns
array

Definition at line 293 of file LocalizationUtilityTest.php.

◆ setUp()

TYPO3\CMS\Extbase\Tests\Unit\Utility\LocalizationUtilityTest::setUp ( )

Prepare class mocking some dependencies

Definition at line 152 of file LocalizationUtilityTest.php.

References TYPO3\CMS\Core\Tests\BaseTestCase\getAccessibleMock().

◆ tearDown()

TYPO3\CMS\Extbase\Tests\Unit\Utility\LocalizationUtilityTest::tearDown ( )

Reset static properties

Definition at line 164 of file LocalizationUtilityTest.php.

◆ translateDataProvider()

TYPO3\CMS\Extbase\Tests\Unit\Utility\LocalizationUtilityTest::translateDataProvider ( )
Returns
array

Definition at line 230 of file LocalizationUtilityTest.php.

◆ translateForEmptyStringKeyReturnsNull()

TYPO3\CMS\Extbase\Tests\Unit\Utility\LocalizationUtilityTest::translateForEmptyStringKeyReturnsNull ( )

◆ translateForEmptyStringKeyWithArgumentsReturnsNull()

TYPO3\CMS\Extbase\Tests\Unit\Utility\LocalizationUtilityTest::translateForEmptyStringKeyWithArgumentsReturnsNull ( )

◆ translateTest()

TYPO3\CMS\Extbase\Tests\Unit\Utility\LocalizationUtilityTest::translateTest (   $key,
array  $LOCAL_LANG,
  $languageKey,
  $expected,
array  $altLanguageKeys = array(),
array  $arguments = NULL 
)
Parameters
string$key
array$LOCAL_LANG
string$languageKey
string$expected
array$altLanguageKeys
array$arguments
Returns
void translateDataProvider
Test:

Definition at line 272 of file LocalizationUtilityTest.php.

References TYPO3\CMS\Extbase\Utility\LocalizationUtility\translate().

Member Data Documentation

◆ $configurationManagerMock

TYPO3\CMS\Extbase\Tests\Unit\Utility\LocalizationUtilityTest::$configurationManagerMock
protected

Definition at line 29 of file LocalizationUtilityTest.php.

◆ $LOCAL_LANG

TYPO3\CMS\Extbase\Tests\Unit\Utility\LocalizationUtilityTest::$LOCAL_LANG
protected

Definition at line 36 of file LocalizationUtilityTest.php.