예제 #1
0
 public function testUpdateUpdatesArticlesPerFeedCount()
 {
     $feed = new Feed();
     $feed->setId(3);
     $feed->setUrlHash('yo');
     $existingFeed = new Feed();
     $feed->setArticlesPerUpdate(2);
     $item = new Item();
     $item->setGuidHash(md5('hi'));
     $item->setFeedId(3);
     $items = [$item];
     $this->feedMapper->expects($this->any())->method('find')->will($this->returnValue($existingFeed));
     $this->fetcher->expects($this->once())->method('fetch')->will($this->returnValue([$feed, $items]));
     $this->feedMapper->expects($this->once())->method('update')->with($this->equalTo($existingFeed));
     $this->feedService->update($feed->getId(), $this->user);
 }