public function testGetLinksTitleWithoutTitle() { $product = $this->getMockBuilder('\\Magento\\Catalog\\Model\\Product')->disableOriginalConstructor()->setMethods(['_wakeup', 'getLinksTitle'])->getMock(); $product->expects($this->once())->method('getLinksTitle')->willReturn(null); $this->scopeConfig->expects($this->once())->method('getValue')->with(\Magento\Downloadable\Model\Link::XML_PATH_LINKS_TITLE, \Magento\Store\Model\ScopeInterface::SCOPE_STORE)->willReturn('scope_config_value'); $this->assertEquals('scope_config_value', $this->helper->getLinksTitle($product)); }
/** * Return title of links section * * @return string */ public function getLinksTitle() { return $this->_downloadProdConfig->getLinksTitle($this->getProduct()); }
/** * Return title of links section * * @return string */ public function getLinksTitle() { return $this->_downloadableProductConfiguration->getLinksTitle($this->getProduct()); }