From bc27596f70cb170203655a55c0f53ee55d8d6316 Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Wed, 4 Jan 2017 11:10:19 +0100 Subject: Add postprocessor for getting lwn subscriber articles (#72) --- tests/Unit/Fetcher/FeedFetcherTest.php | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'tests') diff --git a/tests/Unit/Fetcher/FeedFetcherTest.php b/tests/Unit/Fetcher/FeedFetcherTest.php index 930cf4c99..ce09bb0e3 100644 --- a/tests/Unit/Fetcher/FeedFetcherTest.php +++ b/tests/Unit/Fetcher/FeedFetcherTest.php @@ -15,6 +15,8 @@ namespace OCA\News\Fetcher; use \OCA\News\Db\Item; use \OCA\News\Db\Feed; +use OCP\Http\Client\IClientService; +use PicoFeed\Processor\ItemPostProcessor; class FeedFetcherTest extends \PHPUnit_Framework_TestCase { @@ -97,11 +99,19 @@ class FeedFetcherTest extends \PHPUnit_Framework_TestCase { $timeFactory->expects($this->any()) ->method('getTime') ->will($this->returnValue($this->time)); + $postProcessor = $this->getMockBuilder(ItemPostProcessor::class) + ->getMock(); + $this->parser->expects($this->any()) + ->method('getItemPostProcessor') + ->will($this->returnValue($postProcessor)); + $clientService = $this->getMockBuilder(IClientService::class) + ->getMock(); $this->fetcher = new FeedFetcher( $this->reader, $this->faviconFactory, $this->l10n, - $timeFactory); + $timeFactory, + $clientService); $this->url = 'http://tests'; $this->permalink = 'http://permalink'; -- cgit v1.2.3