/** * @expectedException \Magento\Framework\Exception\NotFoundException * @expectedExceptionMessage Feed feedIdentifier not found */ public function testGetByIdNotFoundException() { $id = 'feedIdentifier'; $feed = null; $this->feedManager->expects($this->once())->method('getFeed')->with($id)->willReturn($feed); $this->feedRepository->getById($id); }
/** * {@inheritdoc} */ public function getById($feedId) { $feed = $this->feedManager->getFeed($feedId); if (!$feed) { throw new NotFoundException(__('Feed ' . $feedId . ' not found')); } return $feed; }
/** * @return FeedInterface[] */ public function getFeeds() { /** @var FeedInterface[] $feeds */ $feeds = $this->rssManager->getFeeds(); return $feeds; }