summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorBenjamin Brahmer <info@b-brahmer.de>2022-10-08 14:08:55 +0200
committerBenjamin Brahmer <info@b-brahmer.de>2022-10-08 17:29:08 +0200
commitb88e1a546a2ad8fb0cb73855f747d34778a2b1af (patch)
tree484ea8bd568e8c6c571c745affadc97a15e4a89a /tests
parent64eda2fa61d96bc80fc22b9912c9cbd1ca3c733a (diff)
New administrator setting for deleting unread items automatically
Signed-off-by: Benjamin Brahmer <info@b-brahmer.de>
Diffstat (limited to 'tests')
-rw-r--r--tests/Unit/Service/ItemServiceTest.php15
1 files changed, 8 insertions, 7 deletions
diff --git a/tests/Unit/Service/ItemServiceTest.php b/tests/Unit/Service/ItemServiceTest.php
index f91692cda..17a67674c 100644
--- a/tests/Unit/Service/ItemServiceTest.php
+++ b/tests/Unit/Service/ItemServiceTest.php
@@ -605,23 +605,24 @@ class ItemServiceTest extends TestCase
public function testPurgeOverThresholdNull()
{
- $this->config->expects($this->once())
+ $this->config->expects($this->exactly(2))
->method('getAppValue')
- ->with('news', 'autoPurgeCount', 200)
- ->will($this->returnValue(200));
-
+ ->withConsecutive(['news', 'autoPurgeCount', 200], ['news', 'purgeUnread', false])
+ ->willReturnOnConsecutiveCalls(200, false);
+
$this->mapper->expects($this->once())
->method('deleteOverThreshold')
- ->with(200);
+ ->with(200, false);
$this->class->purgeOverThreshold();
}
public function testPurgeOverThresholdSet()
{
- $this->config->expects($this->never())
+ $this->config->expects($this->once())
->method('getAppValue')
- ->with('news', 'autoPurgeCount', 200);
+ ->with('news', 'purgeUnread', false)
+ ->will($this->returnValue(false));
$this->mapper->expects($this->once())
->method('deleteOverThreshold')