/** * {@inheritdoc} */ public function getImage($product, $imageId, $attributes = array()) { $pluginInfo = $this->pluginList->getNext($this->subjectType, 'getImage'); if (!$pluginInfo) { return parent::getImage($product, $imageId, $attributes); } else { return $this->___callPlugins('getImage', func_get_args(), $pluginInfo); } }
/** * @covers Magento\GroupedProduct\Block\Adminhtml\Product\Composite\Fieldset\Grouped::getCurrencyPrice */ public function testGetCurrencyPrice() { $storeId = 2; $price = 1.22; $expectedPrice = 1; $instanceMock = $this->getMock('Magento\\GroupedProduct\\Model\\Product\\Type\\Grouped', array(), array(), '', false); $this->productMock->expects($this->any())->method('getTypeInstance')->will($this->returnValue($instanceMock)); $instanceMock->expects($this->once())->method('getStoreFilter')->will($this->returnValue(true)); $this->productMock->expects($this->once())->method('getStore')->will($this->returnValue($storeId)); $this->coreHelperMock->expects($this->once())->method('currencyByStore')->with($price, $storeId, false)->will($this->returnValue($expectedPrice)); $this->assertEquals($expectedPrice, $this->block->getCurrencyPrice($price)); }