コード例 #1
0
ファイル: SidebarTest.php プロジェクト: Doability/magento2dev
 public function testGetTotalsHtml()
 {
     $totalsHtml = "\$134.36";
     $totalsBlockMock = $this->getMockBuilder('\\Magento\\Checkout\\Block\\Shipping\\Price')->disableOriginalConstructor()->setMethods(['toHtml'])->getMock();
     $totalsBlockMock->expects($this->once())->method('toHtml')->will($this->returnValue($totalsHtml));
     $this->layoutMock->expects($this->once())->method('getBlock')->with('checkout.cart.minicart.totals')->will($this->returnValue($totalsBlockMock));
     $this->assertEquals($totalsHtml, $this->model->getTotalsHtml());
 }
コード例 #2
0
 /**
  * {@inheritdoc}
  */
 public function getTotalsHtml()
 {
     $pluginInfo = $this->pluginList->getNext($this->subjectType, 'getTotalsHtml');
     if (!$pluginInfo) {
         return parent::getTotalsHtml();
     } else {
         return $this->___callPlugins('getTotalsHtml', func_get_args(), $pluginInfo);
     }
 }