public function testGetModulesConfig() { /** @var $modulesConfig Mage_Core_Model_Config_Element */ $modulesConfig = $this->_model->getModulesConfig(); $this->assertInstanceOf('Mage_Core_Model_Config_Element', $modulesConfig); /* Number of nodes is the number of enabled modules, that support translation */ $checkedNode = 'Mage_Core'; $this->assertGreaterThan(1, count($modulesConfig)); $this->assertNotEmpty($modulesConfig->{$checkedNode}); $this->assertXmlStringEqualsXmlString('<Mage_Core> <files> <default>Mage_Core.csv</default> </files> </Mage_Core>', $modulesConfig->{$checkedNode}->asXML()); $this->_model->init('non_existing_area'); $this->assertEquals(array(), $this->_model->getModulesConfig()); }
/** * @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))); }