diff options
author | WENDLING NICOLAS <nicolas.wendling2@etu.unistra.fr> | 2021-02-28 23:15:27 +0100 |
---|---|---|
committer | Sean Molenaar <SMillerDev@users.noreply.github.com> | 2021-04-08 22:31:21 +0200 |
commit | ee49a1d1cca114183aac79aa828fd153fbf0f89b (patch) | |
tree | 30062d76f4efcc56faaab54edbb012b274915368 /tests | |
parent | abba7386eebb7f75c91d61e947bc6955577de54b (diff) |
✅ Fix tests in ItemMapperPaginatedTest:
- testFindAllItemsInvalid
- testFindAllItemsFullInverted
- testFindAllItemsUnread
- testFindAllItemsStarred
Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/Unit/Db/ItemMapperPaginatedTest.php | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/tests/Unit/Db/ItemMapperPaginatedTest.php b/tests/Unit/Db/ItemMapperPaginatedTest.php index 964f27029..3e506ffa1 100644 --- a/tests/Unit/Db/ItemMapperPaginatedTest.php +++ b/tests/Unit/Db/ItemMapperPaginatedTest.php @@ -70,14 +70,14 @@ class ItemMapperPaginatedTest extends MapperTestUtility $this->builder->expects($this->exactly(3)) ->method('andWhere') ->withConsecutive( - ['feeds.user_id = :userId'], + ['(feeds.user_id = :userId AND items.shared_by = \'\') OR items.shared_with = :sharedWith'], ['feeds.deleted_at = 0'] ) ->will($this->returnSelf()); - $this->builder->expects($this->exactly(2)) + $this->builder->expects($this->exactly(3)) ->method('setParameter') - ->withConsecutive(['userId', 'jack'], ['offset', 10]) + ->withConsecutive(['userId', 'jack'], ['sharedWith', 'jack'], ['offset', 10]) ->will($this->returnSelf()); @@ -140,15 +140,15 @@ class ItemMapperPaginatedTest extends MapperTestUtility $this->builder->expects($this->exactly(3)) ->method('andWhere') ->withConsecutive( - ['feeds.user_id = :userId'], + ['(feeds.user_id = :userId AND items.shared_by = \'\') OR items.shared_with = :sharedWith'], ['feeds.deleted_at = 0'], ['items.id > :offset'] ) ->will($this->returnSelf()); - $this->builder->expects($this->exactly(2)) + $this->builder->expects($this->exactly(3)) ->method('setParameter') - ->withConsecutive(['userId', 'jack'], ['offset', 10]) + ->withConsecutive(['userId', 'jack'], ['sharedWith', 'jack'], ['offset', 10]) ->will($this->returnSelf()); @@ -212,7 +212,7 @@ class ItemMapperPaginatedTest 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'], ['feeds.deleted_at = 0'], ['items.id < :offset'], ['items.unread = :unread'] @@ -221,7 +221,7 @@ class ItemMapperPaginatedTest extends MapperTestUtility $this->builder->expects($this->exactly(3)) ->method('setParameter') - ->withConsecutive(['userId', 'jack'], ['offset', 10], ['unread', true]) + ->withConsecutive(['userId', 'jack'], ['sharedWith', 'jack'], ['offset', 10], ['unread', true]) ->will($this->returnSelf()); $this->builder->expects($this->exactly(1)) @@ -352,7 +352,7 @@ class ItemMapperPaginatedTest 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'], ['feeds.deleted_at = 0'], ['items.id < :offset'], ['items.starred = :starred'] @@ -361,7 +361,7 @@ class ItemMapperPaginatedTest extends MapperTestUtility $this->builder->expects($this->exactly(3)) ->method('setParameter') - ->withConsecutive(['userId', 'jack'], ['offset', 10], ['starred', true]) + ->withConsecutive(['userId', 'jack'], ['sharedWith', 'jack'], ['offset', 10], ['starred', true]) ->will($this->returnSelf()); @@ -1485,4 +1485,4 @@ class ItemMapperPaginatedTest extends MapperTestUtility $this->assertEquals([Item::fromRow(['id' => 4])], $result); } -}
\ No newline at end of file +} |