Exemplo n.º 1
0
 /**
  * @magentoAppIsolation enabled
  */
 public function testGetChildChildHtml()
 {
     // Without layout
     $this->assertEmpty($this->_block->getChildChildHtml('alias'));
     // With layout
     $parent1 = $this->_createBlockWithLayout('parent1', 'parent1');
     $parent2 = $this->_createBlockWithLayout('parent2', 'parent2');
     $block1 = $this->_createBlockWithLayout('block1', 'block1', 'Magento\\Framework\\View\\Element\\Text');
     $block2 = $this->_createBlockWithLayout('block2', 'block2', 'Magento\\Framework\\View\\Element\\Text');
     $block3 = $this->_createBlockWithLayout('block3', 'block3', 'Magento\\Framework\\View\\Element\\Text');
     $block4 = $this->_createBlockWithLayout('block4', 'block4', 'Magento\\Framework\\View\\Element\\Text');
     $block1->setText('one');
     $block2->setText('two');
     $block3->setText('three');
     $block4->setText('four');
     $parent1->insert($parent2);
     $parent2->insert($block1, '-', false, 'block1');
     $parent2->insert($block2, '-', false, 'block2');
     $parent2->insert($block3, '-', true, 'block3');
     $parent1->insert($block4);
     $this->assertEquals('twoonethree', $parent1->getChildChildHtml('parent2'));
 }