diff options
Diffstat (limited to 'tests/unit/service/FeedServiceTest.php')
-rw-r--r-- | tests/unit/service/FeedServiceTest.php | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/unit/service/FeedServiceTest.php b/tests/unit/service/FeedServiceTest.php index 697a95efe..001d69adf 100644 --- a/tests/unit/service/FeedServiceTest.php +++ b/tests/unit/service/FeedServiceTest.php @@ -907,5 +907,21 @@ class FeedServiceTest extends \PHPUnit_Framework_TestCase { } + public function testSetPinned () { + $feed = Feed::fromRow(['id' => 3, 'pinned' => false]); + $this->feedMapper->expects($this->once()) + ->method('find') + ->with($this->equalTo($feed->getId()), + $this->equalTo($this->user)) + ->will($this->returnValue($feed)); + + $feed->setPinned(true); + $this->feedMapper->expects($this->once()) + ->method('update') + ->with($this->equalTo($feed)); + + $this->feedService->setPinned(3, true, $this->user); + } + } |