summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorBernhard Posselt <dev@bernhard-posselt.com>2014-09-14 04:17:32 +0200
committerBernhard Posselt <dev@bernhard-posselt.com>2014-09-14 04:17:32 +0200
commit242fdbf9fcc39795fe5567eadcb55c6709b303c5 (patch)
tree6c85a9836080997bf223341e11eecdac3c51ac1e /tests
parent721ae0b8bbde9716ed9073439805fd6497abf508 (diff)
add import articles
Diffstat (limited to 'tests')
-rw-r--r--tests/unit/controller/FeedControllerTest.php13
1 files changed, 12 insertions, 1 deletions
diff --git a/tests/unit/controller/FeedControllerTest.php b/tests/unit/controller/FeedControllerTest.php
index 1ed389db3..ed20308ec 100644
--- a/tests/unit/controller/FeedControllerTest.php
+++ b/tests/unit/controller/FeedControllerTest.php
@@ -421,6 +421,7 @@ class FeedControllerTest extends \PHPUnit_Framework_TestCase {
$feed = new Feed();
$expected = [
+ 'starred' => 3,
'feeds' => [$feed]
];
@@ -430,6 +431,11 @@ class FeedControllerTest extends \PHPUnit_Framework_TestCase {
$this->equalTo($this->user))
->will($this->returnValue($feed));
+ $this->itemService->expects($this->once())
+ ->method('starredCount')
+ ->with($this->equalTo($this->user))
+ ->will($this->returnValue(3));
+
$response = $this->controller->import(array('json'));
$this->assertEquals($expected, $response);
@@ -443,9 +449,14 @@ class FeedControllerTest extends \PHPUnit_Framework_TestCase {
$this->equalTo($this->user))
->will($this->returnValue(null));
+ $this->itemService->expects($this->once())
+ ->method('starredCount')
+ ->with($this->equalTo($this->user))
+ ->will($this->returnValue(3));
+
$response = $this->controller->import(array('json'));
- $this->assertEquals([], $response);
+ $this->assertEquals(['starred' => 3], $response);
}