/** * @param $priceExclTax * @param $weeeTaxExclTax * @param $weeeEnabled * @param $includeWeee * @param $expectedValue * @dataProvider testGetDisplayPriceDataProvider */ public function testGetUnitDisplayPriceExclTax($priceExclTax, $weeeTaxExclTax, $weeeEnabled, $includeWeee, $expectedValue) { $this->weeeHelper->expects($this->once())->method('isEnabled')->will($this->returnValue($weeeEnabled)); $this->item->expects($this->any())->method('getWeeeTaxAppliedAmount')->will($this->returnValue($weeeTaxExclTax)); $this->item->expects($this->once())->method('getCalculationPrice')->will($this->returnValue($priceExclTax)); $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->getUnitDisplayPriceExclTax()); }
/** * Return HTML for unit price excl tax * * @return string */ public function getUnitPriceExclTaxHtml() { $baseUnitPriceExclTax = $this->itemPriceRenderer->getBaseUnitDisplayPriceExclTax(); $unitPriceExclTax = $this->itemPriceRenderer->getUnitDisplayPriceExclTax(); return $this->displayPrices($baseUnitPriceExclTax, $unitPriceExclTax); }