Esempio n. 1
0
 protected function setUp()
 {
     \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\\Framework\\App\\State')->setAreaCode('frontend');
     $this->_block = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\\Framework\\View\\LayoutInterface')->createBlock('Magento\\Checkout\\Block\\Cart\\Sidebar');
     $this->_block->addChild('renderer.list', '\\Magento\\Framework\\View\\Element\\RendererList');
     $this->_block->getChildBlock('renderer.list')->addChild('default', '\\Magento\\Checkout\\Block\\Cart\\Item\\Renderer', ['template' => 'cart/item/default.phtml']);
 }
Esempio n. 2
0
 /**
  * {@inheritdoc}
  */
 public function addChild($alias, $block, $data = array())
 {
     $pluginInfo = $this->pluginList->getNext($this->subjectType, 'addChild');
     if (!$pluginInfo) {
         return parent::addChild($alias, $block, $data);
     } else {
         return $this->___callPlugins('addChild', func_get_args(), $pluginInfo);
     }
 }