diff options
Diffstat (limited to 'tests/unit/businesslayer/ItemBusinessLayerTest.php')
-rw-r--r-- | tests/unit/businesslayer/ItemBusinessLayerTest.php | 40 |
1 files changed, 19 insertions, 21 deletions
diff --git a/tests/unit/businesslayer/ItemBusinessLayerTest.php b/tests/unit/businesslayer/ItemBusinessLayerTest.php index 8a47fd599..e32a3b308 100644 --- a/tests/unit/businesslayer/ItemBusinessLayerTest.php +++ b/tests/unit/businesslayer/ItemBusinessLayerTest.php @@ -130,21 +130,20 @@ class ItemBusinessLayerTest extends \OCA\AppFramework\Utility\TestUtility { } - public function testFindAllFeed(){ + public function testFindAllFeed(){ $type = FeedType::FEED; $this->mapper->expects($this->once()) ->method('findAllFeed') ->with($this->equalTo($this->id), $this->equalTo($this->limit), $this->equalTo($this->offset), - $this->equalTo($this->newestItemId), $this->equalTo($this->status), $this->equalTo($this->user)) ->will($this->returnValue($this->response)); $result = $this->itemBusinessLayer->findAll( $this->id, $type, $this->limit, - $this->offset, $this->newestItemId, $this->showAll, + $this->offset, $this->showAll, $this->user); $this->assertEquals($this->response, $result); } @@ -157,14 +156,13 @@ class ItemBusinessLayerTest extends \OCA\AppFramework\Utility\TestUtility { ->with($this->equalTo($this->id), $this->equalTo($this->limit), $this->equalTo($this->offset), - $this->equalTo($this->newestItemId), $this->equalTo($this->status), $this->equalTo($this->user)) ->will($this->returnValue($this->response)); $result = $this->itemBusinessLayer->findAll( $this->id, $type, $this->limit, - $this->offset, $this->newestItemId, $this->showAll, + $this->offset, $this->showAll, $this->user); $this->assertEquals($this->response, $result); } @@ -176,33 +174,18 @@ class ItemBusinessLayerTest extends \OCA\AppFramework\Utility\TestUtility { ->method('findAll') ->with( $this->equalTo($this->limit), $this->equalTo($this->offset), - $this->equalTo($this->newestItemId), $this->equalTo($this->status), $this->equalTo($this->user)) ->will($this->returnValue($this->response)); $result = $this->itemBusinessLayer->findAll( $this->id, $type, $this->limit, - $this->offset, $this->newestItemId, $this->showAll, + $this->offset, $this->showAll, $this->user); $this->assertEquals($this->response, $result); } - public function testStarredCount(){ - $star = 18; - - $this->mapper->expects($this->once()) - ->method('starredCount') - ->with($this->equalTo($this->user)) - ->will($this->returnValue($star)); - - $result = $this->itemBusinessLayer->starredCount($this->user); - - $this->assertEquals($star, $result); - } - - public function testStar(){ $itemId = 3; $feedId = 5; @@ -310,6 +293,21 @@ class ItemBusinessLayerTest extends \OCA\AppFramework\Utility\TestUtility { $this->itemBusinessLayer->getNewestItemId($this->user); } + + public function testStarredCount(){ + $star = 18; + + $this->mapper->expects($this->once()) + ->method('starredCount') + ->with($this->equalTo($this->user)) + ->will($this->returnValue($star)); + + $result = $this->itemBusinessLayer->starredCount($this->user); + + $this->assertEquals($star, $result); + } + + } |