diff options
Diffstat (limited to 'tests/unit/businesslayer')
-rw-r--r-- | tests/unit/businesslayer/FeedBusinessLayerTest.php | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/tests/unit/businesslayer/FeedBusinessLayerTest.php b/tests/unit/businesslayer/FeedBusinessLayerTest.php index 465dda8cb..18c30e277 100644 --- a/tests/unit/businesslayer/FeedBusinessLayerTest.php +++ b/tests/unit/businesslayer/FeedBusinessLayerTest.php @@ -44,9 +44,18 @@ class FeedBusinessLayerTest extends \OCA\AppFramework\Utility\TestUtility { private $fetcher; private $itemMapper; private $threshold; + private $time; protected function setUp(){ $this->api = $this->getAPIMock(); + $this->time = 222; + $timeFactory = $this->getMockBuilder( + '\OCA\AppFramework\Utility\TimeFactory') + ->disableOriginalConstructor() + ->getMock(); + $timeFactory->expects($this->any()) + ->method('getTime') + ->will($this->returnValue($this->time)); $this->mapper = $this->getMockBuilder('\OCA\News\Db\FeedMapper') ->disableOriginalConstructor() ->getMock(); @@ -57,7 +66,8 @@ class FeedBusinessLayerTest extends \OCA\AppFramework\Utility\TestUtility { ->disableOriginalConstructor() ->getMock(); $this->businessLayer = new FeedBusinessLayer($this->mapper, - $this->fetcher, $this->itemMapper, $this->api); + $this->fetcher, $this->itemMapper, $this->api, + $timeFactory); $this->user = 'jack'; $response = 'hi'; |