<?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;useOCA\News\Service\FeedService;useOCP\AppFramework\Db\DoesNotExistException;useOCA\News\Db\Feed;useOCA\News\Db\Item;useOCA\News\Fetcher\Fetcher;useOCA\News\Fetcher\FetcherException;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('\OCP\ILogger')->disableOriginalConstructor()->getMock();$this->loggerParams=['hi'];$this->time=222;$this->autoPurgeMinimumInterval=10;$timeFactory=$this->getMockBuilder('\OCA\News\Utility\Time')->disableOriginalConstructor()->getMock();$timeFactory->expects($this->any())->method('getTime')->will($this->returnValue($this->time));$this->l10n=$this->getMockBuilder('\OCP\IL10N')->disableOriginalConstructor()->getMock();$this->feedMapper=$this->getMockBuilder('\OCA\News\Db\FeedMapper')->disableOriginalConstructor()->getMock();$this->fetcher=$this->getMockBuilder('\OCA\News\Fetcher\Fetcher')->disableOriginalConstructor()->getMock();$this->itemMapper=$this->getMockBuilder('\OCA\News\Db\ItemMapper')->disableOriginalConstructor()->getMock();$this->purifier=$this->getMockBuilder('\HTMLPurifier')->disableOriginalConstructor()->getMock();$config=$this->getMockBuilder('\OCA\News\Config\Config')->disableOriginalConstructor()->getMock();$config->expects($this->any())->method('getAutoPurgeMinimumInterval')->will($this->