From 242fdbf9fcc39795fe5567eadcb55c6709b303c5 Mon Sep 17 00:00:00 2001 From: Bernhard Posselt Date: Sun, 14 Sep 2014 04:17:32 +0200 Subject: add import articles --- tests/unit/controller/FeedControllerTest.php | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'tests') 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); } -- cgit v1.2.3