public function testToHtmlWithId() { $this->request->expects($this->any())->method('getParam')->will($this->returnValueMap([['id', null, 1], ['store_id', null, 0]])); $this->queue->expects($this->once())->method('load')->will($this->returnSelf()); $this->template->expects($this->any())->method('isPlain')->will($this->returnValue(true)); /** @var \Magento\Store\Model\Store $store */ $this->storeManager->expects($this->once())->method('getDefaultStoreView')->will($this->returnValue(null)); $store = $this->getMock('Magento\\Store\\Model\\Store', ['getId'], [], '', false); $this->storeManager->expects($this->once())->method('getStores')->will($this->returnValue([0 => $store])); $result = $this->preview->toHtml(); $this->assertEquals('<pre></pre>', $result); }