summaryrefslogtreecommitdiffstats
path: root/tests/unit/fetcher/FeedFetcherTest.php
diff options
context:
space:
mode:
authorBernhard Posselt <dev@bernhard-posselt.com>2014-02-11 16:05:37 +0100
committerBernhard Posselt <dev@bernhard-posselt.com>2014-02-11 16:05:58 +0100
commit99af7d32d42d7b77bae4f7747c02db959f35d668 (patch)
tree97e9141c60fb21e7e38b785d0b278da7e31792ca /tests/unit/fetcher/FeedFetcherTest.php
parentd5eab3852c1c6629be6b29016e67e374d85f78ac (diff)
fix XSS when importing articles, speed up update and adding of feeds by only purifying content that will be added to the db
Diffstat (limited to 'tests/unit/fetcher/FeedFetcherTest.php')
-rw-r--r--tests/unit/fetcher/FeedFetcherTest.php8
1 files changed, 1 insertions, 7 deletions
diff --git a/tests/unit/fetcher/FeedFetcherTest.php b/tests/unit/fetcher/FeedFetcherTest.php
index da7348fc9..b4ec42e60 100644
--- a/tests/unit/fetcher/FeedFetcherTest.php
+++ b/tests/unit/fetcher/FeedFetcherTest.php
@@ -81,7 +81,6 @@ 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')
@@ -99,8 +98,7 @@ class FeedFetcherTest extends \OCA\AppFramework\Utility\TestUtility {
$timeFactory,
$this->cacheDirectory,
$this->cacheDuration,
- $this->fetchTimeout,
- $this->purifier);
+ $this->fetchTimeout);
$this->url = 'http://tests';
$this->permalink = 'http://permalink';
@@ -177,10 +175,6 @@ class FeedFetcherTest extends \OCA\AppFramework\Utility\TestUtility {
private function createItem($author=false, $enclosureType=null, $noPubDate=false) {
- $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);