示例#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 getConfig()
 {
     $pluginInfo = $this->pluginList->getNext($this->subjectType, 'getConfig');
     if (!$pluginInfo) {
         return parent::getConfig();
     } else {
         return $this->___callPlugins('getConfig', func_get_args(), $pluginInfo);
     }
 }
示例#3
0
 /**
  * {@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);
     }
 }
示例#4
0
 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());
 }