summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorAurélien <dav.aurelien@gmail.com>2021-02-28 20:00:29 +0100
committerSean Molenaar <SMillerDev@users.noreply.github.com>2021-04-08 22:31:21 +0200
commit6775fe541ec71fde0c8af819607e1b40b72eb2bd (patch)
treeac18f32331aaaa936fafbc5ead27e0bec000b1ce /tests
parente7ec222c1def1d1716c046d45ba0ec028e04ab98 (diff)
Fix testFindAllItemsStarredSearch, testFindAllItemsStarred, testFindAllItemsUnread
Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/Unit/Db/ItemMapperTest.php18
1 files changed, 9 insertions, 9 deletions
diff --git a/tests/Unit/Db/ItemMapperTest.php b/tests/Unit/Db/ItemMapperTest.php
index 49a8a9dad..067043330 100644
--- a/tests/Unit/Db/ItemMapperTest.php
+++ b/tests/Unit/Db/ItemMapperTest.php
@@ -1141,14 +1141,14 @@ class ItemMapperTest extends MapperTestUtility
$this->builder->expects($this->exactly(2))
->method('andWhere')
->withConsecutive(
- ['feeds.user_id = :userId'],
+ ['(feeds.user_id = :userId AND items.shared_by = \'\') OR items.shared_with = :sharedWith'],
['items.unread = 1']
)
->will($this->returnSelf());
- $this->builder->expects($this->exactly(1))
+ $this->builder->expects($this->exactly(2))
->method('setParameter')
- ->with('userId', 'jack')
+ ->withConsecutive(['userId', 'jack'], ['sharedWith', 'jack'])
->will($this->returnSelf());
@@ -1212,14 +1212,14 @@ class ItemMapperTest extends MapperTestUtility
$this->builder->expects($this->exactly(2))
->method('andWhere')
->withConsecutive(
- ['feeds.user_id = :userId'],
+ ['(feeds.user_id = :userId AND items.shared_by = \'\') OR items.shared_with = :sharedWith'],
['items.starred = 1']
)
->will($this->returnSelf());
- $this->builder->expects($this->exactly(1))
+ $this->builder->expects($this->exactly(2))
->method('setParameter')
- ->with('userId', 'jack')
+ ->withConsecutive(['userId', 'jack'], ['sharedWith', 'jack'])
->will($this->returnSelf());
@@ -1286,16 +1286,16 @@ class ItemMapperTest extends MapperTestUtility
$this->builder->expects($this->exactly(4))
->method('andWhere')
->withConsecutive(
- ['feeds.user_id = :userId'],
+ ['(feeds.user_id = :userId AND items.shared_by = \'\') OR items.shared_with = :sharedWith'],
['items.search_index LIKE :term0'],
['items.search_index LIKE :term1'],
['items.starred = 1']
)
->will($this->returnSelf());
- $this->builder->expects($this->exactly(3))
+ $this->builder->expects($this->exactly(4))
->method('setParameter')
- ->withConsecutive(['userId', 'jack'], ['term0', '%key%'], ['term1', '%word%'])
+ ->withConsecutive(['userId', 'jack'], ['sharedWith', 'jack'], ['term0', '%key%'], ['term1', '%word%'])
->will($this->returnSelf());