public function testGetTotalsCache() { $quoteMock = $this->getMock('\\Magento\\Quote\\Model\\Quote', [], [], '', false); $totalsMock = ['totals']; $this->checkoutSessionMock->expects($this->once())->method('getQuote')->willReturn($quoteMock); $quoteMock->expects($this->once())->method('getTotals')->willReturn($totalsMock); $this->assertEquals($totalsMock, $this->model->getTotalsCache()); }
/** * {@inheritdoc} */ public function getConfig() { $pluginInfo = $this->pluginList->getNext($this->subjectType, 'getConfig'); if (!$pluginInfo) { return parent::getConfig(); } else { return $this->___callPlugins('getConfig', func_get_args(), $pluginInfo); } }
/** * {@inheritdoc} */ public function offsetGet($offset) { $pluginInfo = $this->pluginList->getNext($this->subjectType, 'offsetGet'); if (!$pluginInfo) { return parent::offsetGet($offset); } else { return $this->___callPlugins('offsetGet', func_get_args(), $pluginInfo); } }
public function testGetCacheKeyInfo() { $this->assertEquals(['BLOCK_TPL', 'default', $this->_block->getTemplateFile(), 'template' => null, 'item_renders' => 'default|Magento\\Checkout\\Block\\Cart\\Item\\Renderer|cart/item/default.phtml'], $this->_block->getCacheKeyInfo()); }