diff options
author | Marco Nassabain <marco.nassabain@hotmail.com> | 2021-02-16 16:31:43 +0100 |
---|---|---|
committer | Sean Molenaar <SMillerDev@users.noreply.github.com> | 2021-04-08 22:31:21 +0200 |
commit | 89d7293e845ee7bcc9b55910c1a0bb30b3c6e5ad (patch) | |
tree | f78b3094697430cb22eb4d328e4ac5dc56fba8b9 /tests/Unit/Service | |
parent | f9f25ddbd2214abf5b290e881b1f1dbe57342888 (diff) |
✅ Add tests: testFindAllShared, testShare + ...
+ testShareDoesNotExist
Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
Diffstat (limited to 'tests/Unit/Service')
-rw-r--r-- | tests/Unit/Service/ItemServiceTest.php | 26 |
1 files changed, 25 insertions, 1 deletions
diff --git a/tests/Unit/Service/ItemServiceTest.php b/tests/Unit/Service/ItemServiceTest.php index ce4e927e2..04c89ae28 100644 --- a/tests/Unit/Service/ItemServiceTest.php +++ b/tests/Unit/Service/ItemServiceTest.php @@ -174,7 +174,31 @@ class ItemServiceTest extends TestCase $this->assertEquals(['val'], $result); } - public function testFindAllItems() + + public function testFindAllShared() + { + $type = FeedType::SHARED; + $this->mapper->expects($this->once()) + ->method('findAllShared') + ->with( + $this->equalTo(20), + $this->equalTo(5), + $this->equalTo(true), + $this->equalTo(true), + $this->equalTo('jack'), + $this->equalTo([]) + ) + ->will($this->returnValue(['val'])); + + $result = $this->itemService->findAllItems( + 3, $type, 20, 5, + true, true, 'jack' + ); + $this->assertEquals(['val'], $result); + } + + + public function testFindAll() { $type = ListType::STARRED; $this->mapper->expects($this->once()) |