diff options
Diffstat (limited to 'tests/Unit/Controller/FeedControllerTest.php')
-rw-r--r-- | tests/Unit/Controller/FeedControllerTest.php | 47 |
1 files changed, 45 insertions, 2 deletions
diff --git a/tests/Unit/Controller/FeedControllerTest.php b/tests/Unit/Controller/FeedControllerTest.php index cf7bc501e..fde821088 100644 --- a/tests/Unit/Controller/FeedControllerTest.php +++ b/tests/Unit/Controller/FeedControllerTest.php @@ -636,9 +636,52 @@ class FeedControllerTest extends TestCase $feed = $this->getMockBuilder(Feed::class) ->getMock(); + $feed->expects($this->never()) + ->method('setFolderId'); + + $feed->expects($this->once()) + ->method('setPinned') + ->with(true); + + $feed->expects($this->once()) + ->method('setFullTextEnabled') + ->with(false); + + + $feed->expects($this->once()) + ->method('setUpdateMode') + ->with(1); + + + $feed->expects($this->never()) + ->method('setOrdering') + ->with(true); + + + $feed->expects($this->never()) + ->method('setTitle') + ->with(true); + + $this->feedService->expects($this->once()) + ->method('find') + ->with($this->uid, 4) + ->will($this->returnValue($feed)); + + $this->feedService->expects($this->once()) + ->method('update') + ->with($this->uid, $feed); + + $this->class->patch(4, true, false, 1); + } + + public function testPatchFolder() + { + $feed = $this->getMockBuilder(Feed::class) + ->getMock(); + $feed->expects($this->once()) ->method('setFolderId') - ->with(null); + ->with(5); $feed->expects($this->once()) ->method('setPinned') @@ -672,7 +715,7 @@ class FeedControllerTest extends TestCase ->method('update') ->with($this->uid, $feed); - $this->class->patch(4, true, false, 1); + $this->class->patch(4, true, false, 1, null, 5); } public function testPatchDoesNotExist() |