summaryrefslogtreecommitdiffstats
path: root/tests/Unit/Service/FeedServiceTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/Unit/Service/FeedServiceTest.php')
-rw-r--r--tests/Unit/Service/FeedServiceTest.php21
1 files changed, 19 insertions, 2 deletions
diff --git a/tests/Unit/Service/FeedServiceTest.php b/tests/Unit/Service/FeedServiceTest.php
index f869a3ef7..9f4743777 100644
--- a/tests/Unit/Service/FeedServiceTest.php
+++ b/tests/Unit/Service/FeedServiceTest.php
@@ -815,8 +815,8 @@ class FeedServiceTest extends TestCase
->will($this->returnValue([$feed1, $feed2]));
$this->itemService->expects($this->exactly(2))
- ->method('findAllForFeed')
- ->withConsecutive([1], [2])
+ ->method('findAllInFeed')
+ ->withConsecutive(['jack', 1], ['jack', 2])
->willReturn(['a']);
$feeds = $this->class->findAllForUserRecursive($this->uid);
@@ -824,4 +824,21 @@ class FeedServiceTest extends TestCase
$this->assertEquals(['a'], $feeds[1]->items);
}
+ public function testRead()
+ {
+ $feed1 = new Feed();
+ $feed1->setId(1);
+
+ $this->mapper->expects($this->once())
+ ->method('findFromUser')
+ ->with($this->uid, 1)
+ ->will($this->returnValue($feed1));
+
+ $this->mapper->expects($this->exactly(1))
+ ->method('read')
+ ->withConsecutive(['jack', 1, null]);
+
+ $this->class->read($this->uid, 1);
+ }
+
}