From 381f8efd1096001f34810414c1054a00a64179c8 Mon Sep 17 00:00:00 2001 From: Bernhard Posselt Date: Sat, 20 Apr 2013 15:09:15 +0200 Subject: set autopurge limit to 200 and purge per feed rather than per user or per all items, fix #98 --- tests/unit/businesslayer/ItemBusinessLayerTest.php | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) (limited to 'tests/unit/businesslayer') diff --git a/tests/unit/businesslayer/ItemBusinessLayerTest.php b/tests/unit/businesslayer/ItemBusinessLayerTest.php index 9bff8acfc..e3ae280a6 100644 --- a/tests/unit/businesslayer/ItemBusinessLayerTest.php +++ b/tests/unit/businesslayer/ItemBusinessLayerTest.php @@ -249,18 +249,9 @@ class ItemBusinessLayerTest extends \OCA\AppFramework\Utility\TestUtility { public function testAutoPurgeOldWillPurgeOld(){ - $item = new Item(); - $item->setId(3); - $unread = array( - new Item(), $item - ); - $this->mapper->expects($this->once()) - ->method('getReadOlderThanThreshold') - ->with($this->equalTo($this->threshold)) - ->will($this->returnValue($unread)); $this->mapper->expects($this->once()) - ->method('deleteReadOlderThanId') - ->with($this->equalTo($item->getId())); + ->method('deleteReadOlderThanThreshold') + ->with($this->equalTo($this->threshold)); $result = $this->itemBusinessLayer->autoPurgeOld(); -- cgit v1.2.3