public function testGetProductId() { $productId = 1; $this->orderItemMock->expects($this->once())->method('getProductId')->willReturn($productId); $result = $this->item->getProductId($this->orderItemMock); $this->assertEquals($productId, $result); }
/** * {@inheritdoc} */ public function getProductId(\Magento\Sales\Model\Order\Item $item) { $pluginInfo = $this->pluginList->getNext($this->subjectType, 'getProductId'); if (!$pluginInfo) { return parent::getProductId($item); } else { return $this->___callPlugins('getProductId', func_get_args(), $pluginInfo); } }