summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/unit/utility/FeedFetcherTest.php9
1 files changed, 8 insertions, 1 deletions
diff --git a/tests/unit/utility/FeedFetcherTest.php b/tests/unit/utility/FeedFetcherTest.php
index 9ddd9d593..fdc817543 100644
--- a/tests/unit/utility/FeedFetcherTest.php
+++ b/tests/unit/utility/FeedFetcherTest.php
@@ -42,6 +42,7 @@ class FeedFetcherTest extends \OCA\AppFramework\Utility\TestUtility {
private $cacheDuration;
private $time;
private $item;
+ private $purifier;
// items
private $permalink;
@@ -79,6 +80,7 @@ class FeedFetcherTest extends \OCA\AppFramework\Utility\TestUtility {
'\OCA\AppFramework\Utility\FaviconFetcher')
->disableOriginalConstructor()
->getMock();
+ $this->purifier = $this->getMock('purifier', array('purify'));
$this->time = 2323;
$timeFactory = $this->getMockBuilder(
'\OCA\AppFramework\Utility\TimeFactory')
@@ -94,7 +96,8 @@ class FeedFetcherTest extends \OCA\AppFramework\Utility\TestUtility {
$this->faviconFetcher,
$timeFactory,
$this->cacheDirectory,
- $this->cacheDuration);
+ $this->cacheDuration,
+ $this->purifier);
$this->url = 'tests';
$this->permalink = 'http://permalink';
@@ -165,6 +168,10 @@ class FeedFetcherTest extends \OCA\AppFramework\Utility\TestUtility {
private function createItem($author=false, $enclosureType=null) {
+ $this->purifier->expects($this->once())
+ ->method('purify')
+ ->with($this->equalTo($this->body))
+ ->will($this->returnValue($this->body));
$this->expectItem('get_permalink', $this->permalink);
$this->expectItem('get_title', $this->title);
$this->expectItem('get_id', $this->guid);