Exemplo n.º 1
0
 /**
  * @param $priceInclTax
  * @param $weeeTaxInclTax
  * @param $weeeEnabled
  * @param $includeWeee
  * @param $expectedValue
  * @dataProvider testGetDisplayPriceDataProvider
  */
 public function testGetUnitDisplayPriceInclTax($priceInclTax, $weeeTaxInclTax, $weeeEnabled, $includeWeee, $expectedValue)
 {
     $this->weeeHelper->expects($this->once())->method('isEnabled')->will($this->returnValue($weeeEnabled));
     $this->weeeHelper->expects($this->any())->method('getWeeeTaxInclTax')->with($this->item)->will($this->returnValue($weeeTaxInclTax));
     $this->item->expects($this->once())->method('getPriceInclTax')->will($this->returnValue($priceInclTax));
     $this->weeeHelper->expects($this->any())->method('typeOfDisplay')->with([WeeeDisplayConfig::DISPLAY_INCL_DESCR, WeeeDisplayConfig::DISPLAY_INCL], self::ZONE)->will($this->returnValue($includeWeee));
     $this->assertEquals($expectedValue, $this->renderer->getUnitDisplayPriceInclTax());
 }
Exemplo n.º 2
0
 /**
  * Return HTML for unit price incl tax
  *
  * @return string
  */
 public function getUnitPriceInclTaxHtml()
 {
     $baseUnitPriceInclTax = $this->itemPriceRenderer->getBaseUnitDisplayPriceInclTax();
     $unitPriceInclTax = $this->itemPriceRenderer->getUnitDisplayPriceInclTax();
     return $this->displayPrices($baseUnitPriceInclTax, $unitPriceInclTax);
 }