summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorRobin Appelman <robin@icewind.nl>2017-01-04 11:10:19 +0100
committerBernhard Posselt <BernhardPosselt@users.noreply.github.com>2017-01-04 11:10:19 +0100
commitbc27596f70cb170203655a55c0f53ee55d8d6316 (patch)
tree2ae44ee8f5ff0e77f5f8ff0a886db905be55d081 /tests
parent04f66c9710faf9438adcc69028eed082c98a5178 (diff)
Add postprocessor for getting lwn subscriber articles (#72)
Diffstat (limited to 'tests')
-rw-r--r--tests/Unit/Fetcher/FeedFetcherTest.php12
1 files changed, 11 insertions, 1 deletions
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';