summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorBernhard Posselt <nukeawhale@gmail.com>2013-04-27 14:00:52 +0200
committerBernhard Posselt <nukeawhale@gmail.com>2013-04-27 14:00:52 +0200
commitcd2488ee421c5f4d09ddc7ef6484409659aa17c8 (patch)
tree0fa59db4bc76145c4fa76d8a8bb198aa8df35358 /tests
parent95ead2f0dacda070751e22ba4bcdc6127e3c0d3d (diff)
prefer web favicon over feed favicon, fix #101
Diffstat (limited to 'tests')
-rw-r--r--tests/unit/utility/FeedFetcherTest.php19
1 files changed, 10 insertions, 9 deletions
diff --git a/tests/unit/utility/FeedFetcherTest.php b/tests/unit/utility/FeedFetcherTest.php
index ba2e5c191..3794eb1da 100644
--- a/tests/unit/utility/FeedFetcherTest.php
+++ b/tests/unit/utility/FeedFetcherTest.php
@@ -213,7 +213,7 @@ class FeedFetcherTest extends \OCA\AppFramework\Utility\TestUtility {
}
- private function createFeed($hasFavicon=false, $hasWebFavicon=false) {
+ private function createFeed($hasFeedFavicon=false, $hasWebFavicon=false) {
$this->expectCore('get_title', $this->feedTitle);
$this->expectCore('get_link', $this->feedLink);
@@ -224,14 +224,6 @@ class FeedFetcherTest extends \OCA\AppFramework\Utility\TestUtility {
$feed->setUrlHash(md5($this->url));
$feed->setAdded($this->time);
- if($hasFavicon) {
- $this->expectCore('get_image_url', $this->feedImage);
- $feed->setFaviconLink($this->feedImage);
- } else {
- $feed->setFaviconLink(null);
- $this->expectCore('get_image_url', null);
- }
-
if($hasWebFavicon) {
$this->faviconFetcher->expects($this->once())
->method('fetch')
@@ -240,6 +232,15 @@ class FeedFetcherTest extends \OCA\AppFramework\Utility\TestUtility {
$feed->setFaviconLink($this->webFavicon);
}
+ if($hasFeedFavicon) {
+ $this->expectCore('get_image_url', $this->feedImage);
+ $feed->setFaviconLink($this->feedImage);
+ } elseif(!$hasWebFavicon) {
+ $feed->setFaviconLink(null);
+ $this->expectCore('get_image_url', null);
+ }
+
+
return $feed;
}