From 1a76e03f5a89ccd856460a8fa60fedfec2df18e9 Mon Sep 17 00:00:00 2001 From: Benjamin Brahmer Date: Fri, 19 Aug 2022 14:59:02 +0200 Subject: fix unittest Signed-off-by: Benjamin Brahmer --- tests/Unit/Db/ItemMapperTest.php | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/tests/Unit/Db/ItemMapperTest.php b/tests/Unit/Db/ItemMapperTest.php index 7fc45018e..93f02d4b8 100644 --- a/tests/Unit/Db/ItemMapperTest.php +++ b/tests/Unit/Db/ItemMapperTest.php @@ -497,14 +497,14 @@ class ItemMapperTest extends MapperTestUtility ->with('items', 'news_feeds', 'feeds', 'items.feed_id = feeds.id') ->will($this->returnSelf()); - $selectbuilder->expects($this->exactly(2)) + $selectbuilder->expects($this->exactly(3)) ->method('andWhere') - ->withConsecutive(['feeds.user_id = :userId'], ['items.id <= :maxItemId']) + ->withConsecutive(['feeds.user_id = :userId'], ['items.id <= :maxItemId'], ['items.unread != :unread']) ->will($this->returnSelf()); - $selectbuilder->expects($this->exactly(2)) + $selectbuilder->expects($this->exactly(3)) ->method('setParameter') - ->withConsecutive(['userId', 'admin'], ['maxItemId', 4]) + ->withConsecutive(['userId', 'admin'], ['maxItemId', 4], ['unread', false]) ->will($this->returnSelf()); $selectbuilder->expects($this->exactly(1)) @@ -542,14 +542,14 @@ class ItemMapperTest extends MapperTestUtility ->with('unread', 'unread') ->will($this->returnSelf()); - $this->builder->expects($this->exactly(2)) + $this->builder->expects($this->exactly(1)) ->method('andWhere') - ->withConsecutive(['id IN (:idList)'], ['unread != :unread']) + ->withConsecutive(['id IN (:idList)']) ->will($this->returnSelf()); - $this->builder->expects($this->exactly(2)) + $this->builder->expects($this->exactly(1)) ->method('setParameter') - ->withConsecutive(['unread', false], ['idList', [1, 2]]) + ->withConsecutive(['idList', [1, 2]]) ->will($this->returnSelf()); $this->builder->expects($this->exactly(1)) -- cgit v1.2.3