Пример #1
0
 public function testGetSubtotalZero()
 {
     $totals = [];
     $this->quote->expects($this->once())->method('getTotals')->will($this->returnValue($totals));
     $this->assertEquals(0, $this->totalsObj->getSubtotal());
 }
Пример #2
0
 /**
  * @param \Magento\Framework\View\Element\Template\Context $context
  * @param \Magento\Catalog\Helper\Data $catalogData
  * @param \Magento\Customer\Model\Session $customerSession
  * @param \Magento\Checkout\Model\Session $checkoutSession
  * @param \Magento\Tax\Helper\Data $taxHelper
  * @param \Magento\Tax\Model\Config $taxConfig
  * @param array $data
  */
 public function __construct(\Magento\Framework\View\Element\Template\Context $context, \Magento\Catalog\Helper\Data $catalogData, \Magento\Customer\Model\Session $customerSession, \Magento\Checkout\Model\Session $checkoutSession, \Magento\Tax\Helper\Data $taxHelper, \Magento\Tax\Model\Config $taxConfig, array $data = array())
 {
     $this->_taxData = $taxHelper;
     $this->_taxConfig = $taxConfig;
     parent::__construct($context, $catalogData, $customerSession, $checkoutSession, $data);
 }