diff options
author | Robin Appelman <icewind@owncloud.com> | 2014-01-23 22:47:52 +0100 |
---|---|---|
committer | Robin Appelman <icewind@owncloud.com> | 2014-01-23 22:47:52 +0100 |
commit | d38f2576b2d38f1ac9ce24a5bd73ffb02ede63f6 (patch) | |
tree | 2fec9c1f9a005300effb098eb6e4959d154ac4fb /tests | |
parent | 18b77f642a4157363051b5f07109649a90bba2fc (diff) |
fix unit tests
Diffstat (limited to 'tests')
-rw-r--r-- | tests/unit/fetcher/FeedFetcherTest.php | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/tests/unit/fetcher/FeedFetcherTest.php b/tests/unit/fetcher/FeedFetcherTest.php index 83ba3b809..b9f68fdae 100644 --- a/tests/unit/fetcher/FeedFetcherTest.php +++ b/tests/unit/fetcher/FeedFetcherTest.php @@ -160,14 +160,14 @@ class FeedFetcherTest extends \OCA\AppFramework\Utility\TestUtility { } - private function expectCore($method, $return) { - $this->core->expects($this->once()) + private function expectCore($method, $return, $count = 1) { + $this->core->expects($this->exactly($count)) ->method($method) ->will($this->returnValue($return)); } - private function expectItem($method, $return) { - $this->item->expects($this->once()) + private function expectItem($method, $return, $count = 1) { + $this->item->expects($this->exactly($count)) ->method($method) ->will($this->returnValue($return)); } @@ -236,7 +236,7 @@ class FeedFetcherTest extends \OCA\AppFramework\Utility\TestUtility { private function createFeed($hasFeedFavicon=false, $hasWebFavicon=false) { $this->expectCore('get_title', $this->feedTitle); - $this->expectCore('get_permalink', $this->feedLink); + $this->expectCore('get_permalink', $this->feedLink, 2); $feed = new Feed(); $feed->setTitle(html_entity_decode($this->feedTitle)); @@ -280,7 +280,7 @@ class FeedFetcherTest extends \OCA\AppFramework\Utility\TestUtility { public function testFetchMapItemsNoFeedTitleUsesUrl(){ $this->expectCore('get_title', ''); - $this->expectCore('get_permalink', $this->feedLink); + $this->expectCore('get_permalink', $this->feedLink, 2); $feed = new Feed(); $feed->setTitle($this->url); @@ -340,7 +340,7 @@ class FeedFetcherTest extends \OCA\AppFramework\Utility\TestUtility { public function testFetchMapItemsGetFavicon() { $this->expectCore('get_title', $this->feedTitle); - $this->expectCore('get_permalink', $this->feedLink); + $this->expectCore('get_permalink', $this->feedLink, 2); $feed = new Feed(); $feed->setTitle(html_entity_decode($this->feedTitle)); @@ -366,7 +366,7 @@ class FeedFetcherTest extends \OCA\AppFramework\Utility\TestUtility { public function testFetchMapItemsNoGetFavicon() { $this->expectCore('get_title', $this->feedTitle); - $this->expectCore('get_permalink', $this->feedLink); + $this->expectCore('get_permalink', $this->feedLink, 2); $feed = new Feed(); $feed->setTitle(html_entity_decode($this->feedTitle)); |