34 $this->urlInterface = $this->createMock(\
Magento\Framework\UrlInterface::class);
35 $this->scopeConfigInterface = $this->createMock(\
Magento\Framework\
App\Config\ScopeConfigInterface::class);
37 $objectManagerHelper =
new ObjectManagerHelper($this);
38 $this->urlBuilder = $objectManagerHelper->getObject(
39 \
Magento\Rss\Model\UrlBuilder::class,
41 'urlBuilder' => $this->urlInterface,
42 'scopeConfig' => $this->scopeConfigInterface
49 $this->scopeConfigInterface->expects($this->once())->method(
'getValue')
50 ->with(
'rss/config/active', \
Magento\Store\Model\ScopeInterface::SCOPE_STORE)
51 ->will($this->returnValue(
false));
52 $this->assertEquals(
'', $this->urlBuilder->getUrl());
57 $this->scopeConfigInterface->expects($this->once())->method(
'getValue')
58 ->with(
'rss/config/active', \
Magento\Store\Model\ScopeInterface::SCOPE_STORE)
59 ->will($this->returnValue(
true));
60 $this->urlInterface->expects($this->once())->method(
'getUrl')
61 ->with(
'rss/feed/index', [
'type' =>
'rss_feed'])
62 ->will($this->returnValue(
'http://magento.com/rss/feed/index/type/rss_feed'));
64 'http://magento.com/rss/feed/index/type/rss_feed',
65 $this->urlBuilder->getUrl([
'type' =>
'rss_feed'])