Example #1
0
 public function testGetSubtotalInclTaxNegative()
 {
     $taxAmount = 1;
     $discountTaxCompensation = 1;
     $rowTotal = 15;
     $expected = 17;
     $itemMock = $this->getMock('Magento\\Framework\\Object', ['getRowTotalInclTax', 'getTaxAmount', 'getDiscountTaxCompensation', 'getRowTotal'], [], '', false);
     $itemMock->expects($this->once())->method('getRowTotalInclTax')->will($this->returnValue(false));
     $itemMock->expects($this->once())->method('getTaxAmount')->will($this->returnValue($taxAmount));
     $itemMock->expects($this->once())->method('getDiscountTaxCompensation')->will($this->returnValue($discountTaxCompensation));
     $itemMock->expects($this->once())->method('getRowTotal')->will($this->returnValue($rowTotal));
     $this->assertEquals($expected, $this->_helper->getSubtotalInclTax($itemMock));
 }
 /**
  * Display susbtotal price including tax
  *
  * @param Item $item
  * @return string
  */
 public function displaySubtotalInclTax($item)
 {
     return $this->displayPrices($this->_checkoutHelper->getBaseSubtotalInclTax($item), $this->_checkoutHelper->getSubtotalInclTax($item));
 }