diff options
author | Bernhard Posselt <dev@bernhard-posselt.com> | 2014-09-14 04:17:32 +0200 |
---|---|---|
committer | Bernhard Posselt <dev@bernhard-posselt.com> | 2014-09-14 04:17:32 +0200 |
commit | 242fdbf9fcc39795fe5567eadcb55c6709b303c5 (patch) | |
tree | 6c85a9836080997bf223341e11eecdac3c51ac1e /tests/unit/controller/FeedControllerTest.php | |
parent | 721ae0b8bbde9716ed9073439805fd6497abf508 (diff) |
add import articles
Diffstat (limited to 'tests/unit/controller/FeedControllerTest.php')
-rw-r--r-- | tests/unit/controller/FeedControllerTest.php | 13 |
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); } |