summaryrefslogtreecommitdiffstats
path: root/tests/unit/businesslayer/ItemBusinessLayerTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/unit/businesslayer/ItemBusinessLayerTest.php')
-rw-r--r--tests/unit/businesslayer/ItemBusinessLayerTest.php14
1 files changed, 9 insertions, 5 deletions
diff --git a/tests/unit/businesslayer/ItemBusinessLayerTest.php b/tests/unit/businesslayer/ItemBusinessLayerTest.php
index 349ad865c..a3e7f7a14 100644
--- a/tests/unit/businesslayer/ItemBusinessLayerTest.php
+++ b/tests/unit/businesslayer/ItemBusinessLayerTest.php
@@ -47,10 +47,7 @@ class ItemBusinessLayerTest extends \OCA\News\Utility\TestUtility {
protected function setUp(){
$this->time = 222;
- $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));
@@ -66,8 +63,15 @@ class ItemBusinessLayerTest extends \OCA\News\Utility\TestUtility {
->method('typeToStatus')
->will($this->returnValue($this->status));
$this->threshold = 2;
+ $config = $this->getMockBuilder(
+ '\OCA\News\Utility\Config')
+ ->disableOriginalConstructor()
+ ->getMock();
+ $config->expects($this->any())
+ ->method('getAutoPurgeCount')
+ ->will($this->returnValue($this->threshold));
$this->itemBusinessLayer = new ItemBusinessLayer($this->mapper,
- $statusFlag, $timeFactory, $this->threshold);
+ $statusFlag, $timeFactory, $config);
$this->user = 'jack';
$response = 'hi';
$this->id = 3;