public function testAddHandle() { $handle = 'test_handle'; $layoutProcessor = $this->getMock('Magento\\Framework\\View\\Layout\\ProcessorInterface'); $layoutProcessor->expects($this->once())->method('addHandle')->with($handle); $this->layout->expects($this->once())->method('getUpdate')->will($this->returnValue($layoutProcessor)); $this->model->addHandle($handle); }
/** * Prepare layout * * @return $this */ protected function _prepareLayout() { $this->priceLayout->addHandle($this->getPriceRenderHandle()); $this->priceLayout->loadLayout(); return parent::_prepareLayout(); }