diff options
author | Bernhard Posselt <dev@bernhard-posselt.com> | 2014-12-17 19:22:26 +0100 |
---|---|---|
committer | Bernhard Posselt <dev@bernhard-posselt.com> | 2015-01-18 14:06:07 +0100 |
commit | 26452806f56a563f3bc1486fa4953b972bb71285 (patch) | |
tree | bd32a0b2e0cf12c420d8ce4d211ec52c7b03f54f | |
parent | 73759298658da929fe2da06d0446a93a56859067 (diff) |
another removed service
-rw-r--r-- | appinfo/application.php | 9 | ||||
-rw-r--r-- | fetcher/feedfetcher.php | 3 | ||||
-rw-r--r-- | tests/unit/fetcher/FeedFetcherTest.php | 5 |
3 files changed, 6 insertions, 11 deletions
diff --git a/appinfo/application.php b/appinfo/application.php index b73684191..dcb6893da 100644 --- a/appinfo/application.php +++ b/appinfo/application.php @@ -221,15 +221,6 @@ class Application extends App { return $fetcher; }); - $container->registerService('OCA\News\Fetcher\FeedFetcher', function($c) { - return new FeedFetcher( - $c->query('PicoFeed\Reader\Reader'), - $c->query('OCA\News\Utility\PicoFeedFaviconFactory'), - $c->query('OCP\IL10N'), - $c->query('OCP\AppFramework\Utility\ITimeFactory') - ); - }); - $container->registerService('OCA\News\Explore\RecommendedSites', function($c) { return new RecommendedSites(__DIR__ . '/../explore'); }); diff --git a/fetcher/feedfetcher.php b/fetcher/feedfetcher.php index 28d1f951c..5eeb58548 100644 --- a/fetcher/feedfetcher.php +++ b/fetcher/feedfetcher.php @@ -24,6 +24,7 @@ use \PicoFeed\Client\MaxSizeException; use \PicoFeed\Client\TimeoutException; use \OCP\IL10N; +use \OCP\AppFramework\Utility\ITimeFactory; use \OCA\News\Db\Item; use \OCA\News\Db\Feed; @@ -40,7 +41,7 @@ class FeedFetcher implements IFeedFetcher { public function __construct(Reader $reader, PicoFeedFaviconFactory $faviconFactory, IL10N $l10n, - $time){ + ITimeFactory $time){ $this->faviconFactory = $faviconFactory; $this->reader = $reader; $this->time = $time; diff --git a/tests/unit/fetcher/FeedFetcherTest.php b/tests/unit/fetcher/FeedFetcherTest.php index 9c24524b0..d9652429a 100644 --- a/tests/unit/fetcher/FeedFetcherTest.php +++ b/tests/unit/fetcher/FeedFetcherTest.php @@ -86,7 +86,10 @@ class FeedFetcherTest extends \PHPUnit_Framework_TestCase { ->getMock(); $this->time = 2323; - $timeFactory = $this->getMock('TimeFactory', ['getTime']); + $timeFactory = $this->getMockBuilder( + '\OCP\AppFramework\Utility\ITimeFactory') + ->disableOriginalConstructor() + ->getMock(); $timeFactory->expects($this->any()) ->method('getTime') ->will($this->returnValue($this->time)); |