diff options
author | Marco Nassabain <marco.nassabain@hotmail.com> | 2021-02-07 22:26:49 +0100 |
---|---|---|
committer | Sean Molenaar <SMillerDev@users.noreply.github.com> | 2021-04-08 22:31:21 +0200 |
commit | 4133e68c8ec87fd53dc424a4512758acbd4dc7d6 (patch) | |
tree | c34d2956b1d26412280bfea8f743d8199c76852b /tests/Unit/Controller/ItemControllerTest.php | |
parent | 54aa8b527099edb409099335638382dbf754f36b (diff) |
✅ Update tests to contain share data
Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
Diffstat (limited to 'tests/Unit/Controller/ItemControllerTest.php')
-rw-r--r-- | tests/Unit/Controller/ItemControllerTest.php | 27 |
1 files changed, 24 insertions, 3 deletions
diff --git a/tests/Unit/Controller/ItemControllerTest.php b/tests/Unit/Controller/ItemControllerTest.php index c64cd9330..db3b5234b 100644 --- a/tests/Unit/Controller/ItemControllerTest.php +++ b/tests/Unit/Controller/ItemControllerTest.php @@ -231,7 +231,8 @@ class ItemControllerTest extends TestCase 'items' => [new Item()], 'feeds' => $feeds, 'newestItemId' => $this->newestItemId, - 'starred' => 3 + 'starred' => 3, + // 'shared' => 99 // TODO: uncomment when implement shared ]; $this->itemsApiExpects(2, ListType::FEED, '0'); @@ -251,6 +252,12 @@ class ItemControllerTest extends TestCase ->with('user') ->will($this->returnValue([1, 2, 3])); + // TODO: uncomment when implemented + // $this->itemService->expects($this->once()) + // ->method('shared') + // ->with($this->equalTo($this->user)) + // ->will($this->returnValue($result['shared'])); + $this->itemService->expects($this->once()) ->method('findAllInFeedWithFilters') ->with('user', 2, 3, 0, false, false, []) @@ -268,7 +275,8 @@ class ItemControllerTest extends TestCase 'items' => [new Item()], 'feeds' => $feeds, 'newestItemId' => $this->newestItemId, - 'starred' => 3 + 'starred' => 3, + // 'shared' => 99 // TODO: uncomment when implemented ]; $this->itemsApiExpects(2, ListType::FOLDER, '0'); @@ -288,6 +296,12 @@ class ItemControllerTest extends TestCase ->with('user') ->will($this->returnValue([1, 2, 3])); + // TODO: uncomment when implemented + // $this->itemService->expects($this->once()) + // ->method('shared') + // ->with($this->equalTo($this->user)) + // ->will($this->returnValue($result['shared'])); + $this->itemService->expects($this->once()) ->method('findAllInFolderWithFilters') ->with('user', 2, 3, 0, false, false, []) @@ -412,7 +426,8 @@ class ItemControllerTest extends TestCase 'items' => [new Item()], 'feeds' => $feeds, 'newestItemId' => $this->newestItemId, - 'starred' => 3 + 'starred' => 3, + // 'shared' => 99 // TODO: uncomment when implemented ]; $this->settings->expects($this->once()) @@ -435,6 +450,12 @@ class ItemControllerTest extends TestCase ->with('user') ->will($this->returnValue([1, 2, 3])); + // TODO: uncomment when implemented + // $this->itemService->expects($this->once()) + // ->method('shared') + // ->with($this->equalTo($this->user)) + // ->will($this->returnValue($result['shared'])); + $this->itemService->expects($this->once()) ->method('findAllInFeedAfter') ->with('user', 2, 3, false) |