示例#1
0
 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());
 }
示例#2
0
 /**
  * {@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);
     }
 }