/** * Retrieve product * * @return \Magento\Catalog\Model\Product */ public function getProduct() { $product = parent::getProduct(); if ($product && $product->getTypeInstance()->getStoreFilter($product) === null) { $product->getTypeInstance()->setStoreFilter($this->_storeManager->getStore(), $product); } return $product; }
public function testGetProduct() { $this->assertSame($this->_product, $this->_block->getProduct()); }