コード例 #1
0
 /**
  * @param $basePriceExclTax
  * @param $baseWeeeTaxExclTax
  * @param $weeeEnabled
  * @param $includeWeee
  * @param $expectedValue
  * @dataProvider testGetDisplayPriceDataProvider
  */
 public function testGetBaseUnitDisplayPriceExclTax($basePriceExclTax, $baseWeeeTaxExclTax, $weeeEnabled, $includeWeee, $expectedValue)
 {
     $this->weeeHelper->expects($this->once())->method('isEnabled')->will($this->returnValue($weeeEnabled));
     $this->item->expects($this->any())->method('getBaseWeeeTaxAppliedAmount')->will($this->returnValue($baseWeeeTaxExclTax));
     $this->item->expects($this->once())->method('getBasePrice')->will($this->returnValue($basePriceExclTax));
     $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->getBaseUnitDisplayPriceExclTax());
 }
コード例 #2
0
ファイル: Renderer.php プロジェクト: aiesh/magento2
 /**
  * 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);
 }