/** * {@inheritdoc} */ public function getPriceInfo(\Magento\Catalog\Model\Product $saleableItem) { $pluginInfo = $this->pluginList->getNext($this->subjectType, 'getPriceInfo'); if (!$pluginInfo) { return parent::getPriceInfo($saleableItem); } else { return $this->___callPlugins('getPriceInfo', func_get_args(), $pluginInfo); } }
/** * Get product Price Info object * * @return \Magento\Framework\Pricing\PriceInfo\Base */ public function getPriceInfo() { if (!$this->_priceInfo) { $this->_priceInfo = $this->_catalogProductType->getPriceInfo($this); } return $this->_priceInfo; }
public function testGetPriceInfo() { $mockedProduct = $this->getMockedProduct(); $expectedResult = '\\Magento\\Framework\\Pricing\\PriceInfoInterface'; $this->assertInstanceOf($expectedResult, $this->_model->getPriceInfo($mockedProduct)); }