Index: tests/t3lib/t3lib_div_testcase.php =================================================================== --- tests/t3lib/t3lib_div_testcase.php (revision 6354) +++ tests/t3lib/t3lib_div_testcase.php (working copy) @@ -651,6 +651,41 @@ t3lib_div::quoteJSvalue('\\') ); } + + /** + * Tests the locallangXMLOverride feature of readLLfile() + * @test + */ + public function readLLfileLocallangXMLOverride() { + $unique = uniqid('locallangXMLOverrideTest'); + + $xml = ' + + + + + + + '; + + $file = PATH_site . 'typo3temp/' . $unique . '.xml'; + t3lib_div::writeFileToTypo3tempDir($file, $xml); + + // get default value + $defaultLL = t3lib_div::readLLfile('EXT:lang/locallang_core.xml', 'default'); + + // set override file + $GLOBALS['TYPO3_CONF_VARS']['SYS']['locallangXMLOverride']['EXT:lang/locallang_core.xml'][$unique] = $file; + + // get override value + $overrideLL = t3lib_div::readLLfile('EXT:lang/locallang_core.xml', 'default'); + + $this->assertNotEquals($overrideLL['default']['buttons.logout'], ''); + $this->assertNotEquals($defaultLL['default']['buttons.logout'], $overrideLL['default']['buttons.logout']); + $this->assertEquals($overrideLL['default']['buttons.logout'], 'EXIT'); + + unlink($file); + } } ?> \ No newline at end of file