summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorAurélien <dav.aurelien@gmail.com>2021-02-28 21:01:05 +0100
committerSean Molenaar <SMillerDev@users.noreply.github.com>2021-04-08 22:31:21 +0200
commite7ec222c1def1d1716c046d45ba0ec028e04ab98 (patch)
tree5b65f982128289e1720f4a7d54c46dac41b602da /tests
parentd6b32cf67473ad3ad7c82504830a58bef8e94a0f (diff)
Fix testFindAllItemsInvalid, testFindAllAfterInvalid, testFindAllAfterStarred, testFindAllAfterUnread
Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/Unit/Db/ItemMapperTest.php15
1 files changed, 9 insertions, 6 deletions
diff --git a/tests/Unit/Db/ItemMapperTest.php b/tests/Unit/Db/ItemMapperTest.php
index 15c968fba..49a8a9dad 100644
--- a/tests/Unit/Db/ItemMapperTest.php
+++ b/tests/Unit/Db/ItemMapperTest.php
@@ -876,7 +876,7 @@ class ItemMapperTest extends MapperTestUtility
->method('andWhere')
->withConsecutive(
['items.last_modified >= :updatedSince'],
- ['feeds.user_id = :userId'],
+ ['(feeds.user_id = :userId AND items.shared_by = \'\') OR items.shared_with = :sharedWith'],
['items.unread = 1']
)
->will($this->returnSelf());
@@ -886,6 +886,7 @@ class ItemMapperTest extends MapperTestUtility
->with([
'updatedSince' => 1610903351,
'userId' => 'jack',
+ 'sharedWith' => 'jack'
])
->will($this->returnSelf());
@@ -939,7 +940,7 @@ class ItemMapperTest extends MapperTestUtility
->method('andWhere')
->withConsecutive(
['items.last_modified >= :updatedSince'],
- ['feeds.user_id = :userId'],
+ ['(feeds.user_id = :userId AND items.shared_by = \'\') OR items.shared_with = :sharedWith'],
['items.starred = 1']
)
->will($this->returnSelf());
@@ -949,6 +950,7 @@ class ItemMapperTest extends MapperTestUtility
->with([
'updatedSince' => 1610903351,
'userId' => 'jack',
+ 'sharedWith' => 'jack'
])
->will($this->returnSelf());
@@ -1005,7 +1007,7 @@ class ItemMapperTest extends MapperTestUtility
->method('andWhere')
->withConsecutive(
['items.last_modified >= :updatedSince'],
- ['feeds.user_id = :userId']
+ ['(feeds.user_id = :userId AND items.shared_by = \'\') OR items.shared_with = :sharedWith'],
)
->will($this->returnSelf());
@@ -1014,6 +1016,7 @@ class ItemMapperTest extends MapperTestUtility
->with([
'updatedSince' => 1610903351,
'userId' => 'jack',
+ 'sharedWith' => 'jack'
])
->will($this->returnSelf());
@@ -1069,13 +1072,13 @@ class ItemMapperTest extends MapperTestUtility
$this->builder->expects($this->exactly(1))
->method('andWhere')
->withConsecutive(
- ['feeds.user_id = :userId']
+ ['(feeds.user_id = :userId AND items.shared_by = \'\') OR items.shared_with = :sharedWith'],
)
->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());