示例#1
0
 /**
  * @covers Mage_Core_Model_Layout_Translator::translateArgument
  */
 public function testTranslateArgumentViaParentWithNodeThatIsNotInTranslateList()
 {
     $this->_helperFactoryMock->expects($this->never())->method('get');
     $actual = $this->_object->translateArgument($this->_xmlDocument->arguments_parent->node_no_translated);
     $this->assertEquals('no translated', $actual);
 }
示例#2
0
 protected function _fillArgumentsArray(Mage_Core_Model_Layout_Element $node, &$argumentsArray, $moduleName)
 {
     $moduleName = isset($node['module']) ? (string) $node['module'] : $moduleName;
     /** @var $childNode Mage_Core_Model_Layout_Element */
     foreach ($node->children() as $childNode) {
         $nodeName = $childNode->getName();
         if ($childNode->hasChildren()) {
             $this->_fillArgumentsArray($childNode, $argumentsArray[$nodeName], $moduleName);
         } else {
             $argumentsArray[$nodeName] = $this->_translator->translateArgument($childNode, $moduleName);
         }
     }
 }