From 9d5ac4b039ecb8f0dd37ede8bc0ae771f1580903 Mon Sep 17 00:00:00 2001 From: Sean Molenaar Date: Mon, 11 Mar 2019 22:36:00 +0100 Subject: Catch FeedIO reader exception. Closes #413 Closes #412 --- tests/Unit/Service/FeedServiceTest.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'tests') diff --git a/tests/Unit/Service/FeedServiceTest.php b/tests/Unit/Service/FeedServiceTest.php index 9b0c50b20..149b3cdaf 100644 --- a/tests/Unit/Service/FeedServiceTest.php +++ b/tests/Unit/Service/FeedServiceTest.php @@ -14,6 +14,8 @@ namespace OCA\News\Tests\Unit\Service; +use FeedIo\Reader\ReadErrorException; + use OCA\News\Config\Config; use OCA\News\Db\FeedMapper; use OCA\News\Db\ItemMapper; @@ -114,7 +116,7 @@ class FeedServiceTest extends TestCase public function testCreateDoesNotFindFeed() { - $ex = new FetcherException('hi'); + $ex = new ReadErrorException('hi'); $url = 'test'; $this->fetcher->expects($this->once()) ->method('fetch') @@ -581,7 +583,7 @@ class FeedServiceTest extends TestCase $exptectedFeed->setUpdateErrorCount(1); $exptectedFeed->setLastUpdateError('hi'); - $ex = new FetcherException('hi'); + $ex = new ReadErrorException('hi'); $this->feedMapper->expects($this->at(0)) ->method('find') -- cgit v1.2.3