diff options
author | Sean Molenaar <sean@seanmolenaar.eu> | 2020-08-29 23:39:35 +0200 |
---|---|---|
committer | Benjamin Brahmer <info@b-brahmer.de> | 2020-09-27 15:35:31 +0200 |
commit | d00d1ab2a28f428223e52b17052c072c64784016 (patch) | |
tree | c019f85fb7ac67147dd43ca64b4ac3cda99832f7 /tests/Unit/Controller/FeedControllerTest.php | |
parent | 5687baca75d47dbdffd3de74e865ad2f71ef0cb7 (diff) |
Create V2 mapper, Service and management commands
Signed-off-by: Sean Molenaar <sean@seanmolenaar.eu>
Diffstat (limited to 'tests/Unit/Controller/FeedControllerTest.php')
-rw-r--r-- | tests/Unit/Controller/FeedControllerTest.php | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/tests/Unit/Controller/FeedControllerTest.php b/tests/Unit/Controller/FeedControllerTest.php index 9a3114da0..7498d0ccb 100644 --- a/tests/Unit/Controller/FeedControllerTest.php +++ b/tests/Unit/Controller/FeedControllerTest.php @@ -21,8 +21,8 @@ use OCP\AppFramework\Http; use OCA\News\Db\Feed; use OCA\News\Db\FeedType; -use OCA\News\Service\ServiceNotFoundException; -use OCA\News\Service\ServiceConflictException; +use OCA\News\Service\Exceptions\ServiceNotFoundException; +use OCA\News\Service\Exceptions\ServiceConflictException; use OCP\IConfig; use OCP\IRequest; @@ -93,7 +93,7 @@ class FeedControllerTest extends TestCase 'starred' => 13 ]; $this->feedService->expects($this->once()) - ->method('findAll') + ->method('findAllForUser') ->with($this->equalTo($this->user)) ->will($this->returnValue($result['feeds'])); $this->itemService->expects($this->once()) @@ -121,7 +121,7 @@ class FeedControllerTest extends TestCase 'newestItemId' => 5 ]; $this->feedService->expects($this->once()) - ->method('findAll') + ->method('findAllForUser') ->with($this->equalTo($this->user)) ->will($this->returnValue($result['feeds'])); $this->itemService->expects($this->once()) @@ -189,7 +189,7 @@ class FeedControllerTest extends TestCase $this->feedService->expects($this->once()) ->method('find') - ->with($this->equalTo($id), $this->equalTo($this->user)) + ->with($this->user, $id) ->will($this->throwException($ex)); $this->activeInitMocks($id, $type); @@ -209,7 +209,7 @@ class FeedControllerTest extends TestCase $this->folderService->expects($this->once()) ->method('find') - ->with($this->equalTo($id), $this->equalTo($this->user)) + ->with($this->user, $id) ->will($this->throwException($ex)); $this->activeInitMocks($id, $type); @@ -374,7 +374,7 @@ class FeedControllerTest extends TestCase $this->feedService->expects($this->once()) ->method('update') - ->with($this->equalTo(4), $this->equalTo($this->user)) + ->with($this->equalTo($this->user), $this->equalTo(4)) ->will($this->returnValue($feed)); $response = $this->controller->update(4); @@ -387,7 +387,7 @@ class FeedControllerTest extends TestCase { $this->feedService->expects($this->once()) ->method('update') - ->with($this->equalTo(4), $this->equalTo($this->user)) + ->with($this->equalTo($this->user), $this->equalTo(4)) ->will($this->throwException(new ServiceNotFoundException('NO!'))); $response = $this->controller->update(4); |