<?php/** * Nextcloud - News * * This file is licensed under the Affero General Public License version 3 or * later. See the COPYING file. * * @author Alessandro Cosentino <cosenal@gmail.com> * @author Bernhard Posselt <dev@bernhard-posselt.com> * @copyright 2012 Alessandro Cosentino * @copyright 2012-2014 Bernhard Posselt */namespaceOCA\News\Tests\Unit\Service;useFeedIo\Reader\ReadErrorException;useOCA\News\Config\Config;useOCA\News\Db\FeedMapper;useOCA\News\Db\ItemMapper;useOCA\News\Service\FeedService;useOCA\News\Service\ServiceNotFoundException;useOCA\News\Utility\Time;useOCP\AppFramework\Db\DoesNotExistException;useOCA\News\Db\Feed;useOCA\News\Db\Item;useOCA\News\Fetcher\Fetcher;useOCA\News\Fetcher\FetcherException;useOCP\IL10N;useOCP\ILogger;usePHPUnit\Framework\TestCase;classFeedServiceTestextendsTestCase{private$feedMapper;/** @var FeedService */private$feedService;private$user;private$response;private$fetcher;private$itemMapper;private$threshold;private$time;private$importParser;private$autoPurgeMinimumInterval;private$purifier;private$l10n;private$logger;private$loggerParams;protectedfunctionsetUp(){$this->logger=$this->getMockBuilder(ILogger::class)->disableOriginalConstructor()->getMock();$this->loggerParams=['hi'];$this->time=222;$this->autoPurgeMinimumInterval=10;$timeFactory=$this->getMockBuilder(Time::class)->disableOriginalConstructor()->getMock();$timeFactory->expects($this->any())->method('getTime')->will($this->returnValue($this->time));$this->l10n=$this->getMockBuilder(IL10N::class)->disableOriginalConstructor()->getMock();$this->feedMapper=$this->getMockBuilder(FeedMapper::class)->disableOriginalConstructor()->getMock();$this->fetcher=$this->getMockBuilder(Fetcher::class)->disableOriginalConstructor()->getMock();$this->itemMapper=$this->getMockBuilder(ItemMapper::class)->disableOriginalConstructor()->getMock();$this->purifier=$this->getMockBuilder(\HTMLPurifier::class)->disableOriginalConstructor