diff options
-rw-r--r-- | tests/Unit/Db/ItemMapperTest.php | 15 |
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()); |