diff options
Diffstat (limited to 'tests/unit/bl/FeedBlTest.php')
-rw-r--r-- | tests/unit/bl/FeedBlTest.php | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/unit/bl/FeedBlTest.php b/tests/unit/bl/FeedBlTest.php index 92c472834..b1c5ba3c8 100644 --- a/tests/unit/bl/FeedBlTest.php +++ b/tests/unit/bl/FeedBlTest.php @@ -78,6 +78,12 @@ class FeedBlTest extends \OCA\AppFramework\Utility\TestUtility { public function testCreateDoesNotFindFeed(){ $ex = new FetcherException('hi'); $url = 'test'; + $trans = $this->getMock('Trans', array('t')); + $trans->expects($this->once()) + ->method('t'); + $this->api->expects($this->once()) + ->method('getTrans') + ->will($this->returnValue($trans)); $this->mapper->expects($this->once()) ->method('findByUrlHash') ->with($this->equalTo(md5($url)), $this->equalTo($this->user)) @@ -128,6 +134,12 @@ class FeedBlTest extends \OCA\AppFramework\Utility\TestUtility { public function testCreateFeedExistsAlready(){ $url = 'test'; + $trans = $this->getMock('Trans', array('t')); + $trans->expects($this->once()) + ->method('t'); + $this->api->expects($this->once()) + ->method('getTrans') + ->will($this->returnValue($trans)); $this->mapper->expects($this->once()) ->method('findByUrlHash') ->with($this->equalTo(md5($url)), $this->equalTo($this->user)); |