Example #1
0
 public function testToHtmlWithContainer()
 {
     $listName = $this->_block->getNameInLayout();
     $block1 = $this->_layout->addBlock('Magento\\Framework\\View\\Element\\Text', '', $listName);
     $this->_layout->addContainer('container', 'Container', [], $listName);
     $block2 = $this->_layout->addBlock('Magento\\Framework\\View\\Element\\Text', '', 'container');
     $block3 = $this->_layout->addBlock('Magento\\Framework\\View\\Element\\Text', '', $listName);
     $block1->setText('text1');
     $block2->setText('text2');
     $block3->setText('text3');
     $html = $this->_block->toHtml();
     $this->assertEquals('text1text2text3', $html);
 }