summaryrefslogtreecommitdiffstats
path: root/tests/unit/businesslayer/ItemBusinessLayerTest.php
diff options
context:
space:
mode:
authorBernhard Posselt <nukeawhale@gmail.com>2013-05-02 19:40:10 +0200
committerBernhard Posselt <nukeawhale@gmail.com>2013-05-02 19:40:10 +0200
commit5ae697ac9dbaf999d51fa7805078249f33c301dc (patch)
treea4f408c9462ff4353820e266efad4864043d08f2 /tests/unit/businesslayer/ItemBusinessLayerTest.php
parente9878cb5b583bc993a9f3a482d0b371bbeea5bd2 (diff)
added proper exception handling for all controllers and businesslayer
Diffstat (limited to 'tests/unit/businesslayer/ItemBusinessLayerTest.php')
-rw-r--r--tests/unit/businesslayer/ItemBusinessLayerTest.php11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/unit/businesslayer/ItemBusinessLayerTest.php b/tests/unit/businesslayer/ItemBusinessLayerTest.php
index e32a3b308..2094456b7 100644
--- a/tests/unit/businesslayer/ItemBusinessLayerTest.php
+++ b/tests/unit/businesslayer/ItemBusinessLayerTest.php
@@ -248,6 +248,17 @@ class ItemBusinessLayerTest extends \OCA\AppFramework\Utility\TestUtility {
}
+ public function testStarDoesNotExist(){
+
+ $this->setExpectedException('\OCA\News\BusinessLayer\BusinessLayerException');
+ $this->mapper->expects($this->once())
+ ->method('findByGuidHash')
+ ->will($this->throwException(new DoesNotExistException('')));
+
+ $this->itemBusinessLayer->star(1, 'hash', true, $this->user);
+ }
+
+
public function testReadFeed(){
$feedId = 3;
$highestItemId = 6;