/**
  * @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);
 }
Ejemplo n.º 2
0
 /**
  * {@inheritdoc}
  */
 public function getById($feedId)
 {
     $feed = $this->feedManager->getFeed($feedId);
     if (!$feed) {
         throw new NotFoundException(__('Feed ' . $feedId . ' not found'));
     }
     return $feed;
 }
Ejemplo n.º 3
0
 /**
  * @return FeedInterface[]
  */
 public function getFeeds()
 {
     /** @var FeedInterface[] $feeds */
     $feeds = $this->rssManager->getFeeds();
     return $feeds;
 }