diff options
author | Bernhard Posselt <dev@bernhard-posselt.com> | 2014-04-09 16:10:48 +0200 |
---|---|---|
committer | Bernhard Posselt <dev@bernhard-posselt.com> | 2014-04-09 22:52:27 +0200 |
commit | 643fa4624dd7ba2db1349f16131bf330aeee3387 (patch) | |
tree | 73bc787a3eb1ed5f53ab932187546c980ac50bb5 /tests/unit/fetcher/FeedFetcherTest.php | |
parent | efe9db1e064c9736fe35c27040ee60fa28ca8d4d (diff) |
port to internal controller, some routes are still broken
Diffstat (limited to 'tests/unit/fetcher/FeedFetcherTest.php')
-rw-r--r-- | tests/unit/fetcher/FeedFetcherTest.php | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/tests/unit/fetcher/FeedFetcherTest.php b/tests/unit/fetcher/FeedFetcherTest.php index 806c2012a..ff076d11c 100644 --- a/tests/unit/fetcher/FeedFetcherTest.php +++ b/tests/unit/fetcher/FeedFetcherTest.php @@ -82,23 +82,29 @@ class FeedFetcherTest extends \OCA\News\Utility\TestUtility { ->disableOriginalConstructor() ->getMock(); $this->time = 2323; - $timeFactory = $this->getMockBuilder( - '\OCA\News\Utility\TimeFactory') - ->disableOriginalConstructor() - ->getMock(); + $timeFactory = $this->getMock('TimeFactory', array('getTime')); $timeFactory->expects($this->any()) ->method('getTime') ->will($this->returnValue($this->time)); $this->cacheDuration = 100; $this->cacheDirectory = 'dir/'; $this->fetchTimeout = 40; + $config = $this->getMockBuilder( + '\OCA\News\Utility\Config') + ->disableOriginalConstructor() + ->getMock(); + $config->expects($this->any()) + ->method('getSimplePieCacheDuration') + ->will($this->returnValue($this->cacheDuration)); + $config->expects($this->any()) + ->method('getFeedFetcherTimeout') + ->will($this->returnValue($this->fetchTimeout)); $this->fetcher = new FeedFetcher($this->getAPIMock(), $this->coreFactory, $this->faviconFetcher, $timeFactory, $this->cacheDirectory, - $this->cacheDuration, - $this->fetchTimeout); + $config); $this->url = 'http://tests'; $this->permalink = 'http://permalink'; |