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 getTotalsCache() { $pluginInfo = $this->pluginList->getNext($this->subjectType, 'getTotalsCache'); if (!$pluginInfo) { return parent::getTotalsCache(); } else { return $this->___callPlugins('getTotalsCache', func_get_args(), $pluginInfo); } }