public function testGetSetLocale() { $this->assertEquals('en_US', $this->_model->getLocale()); $this->_model->setLocale('ru_RU'); $this->assertEquals('ru_RU', $this->_model->getLocale()); }
/** * @magentoConfigFixture global/locale/inheritance/en_AU en_UK * @magentoConfigFixture global/locale/inheritance/en_UK en_US * @dataProvider translateWithLocaleInheritanceDataProvider */ public function testTranslateWithLocaleInheritance($inputText, $expectedTranslation) { $model = new Mage_Core_Model_Translate(); $model->setLocale('en_AU'); $model->init('frontend'); $this->assertEquals($expectedTranslation, $model->translate(array($inputText))); }