/** * @return string */ public function getL10n($key) { return $this->l10nProvider->getL10n($key); }
public function testGetL10nWithNoLocale() { $key = 'key'; $localization = 'fr'; $locale = 'fr-FR'; $expected = 'my-value'; $l10nResource = new L10nResource(); $l10nResource->setValueList(array($expected)); $this->l10nManager->expects($this->once())->method('getL10nResource')->with($key, $localization)->will($this->returnValue($l10nResource)); $l10nProvider = new L10nProvider($this->l10nManager, 'xx', 'xx-XX'); $value = $l10nProvider->getL10n($key, $localization, $locale); $this->assertEquals($expected, $value); }