1
0
mirror of https://github.com/chylex/Nextcloud-News.git synced 2025-04-09 10:15:44 +02:00
This commit is contained in:
Bernhard Posselt 2014-02-11 02:37:41 +01:00
parent 2622ae63e0
commit c638ef6f06
2 changed files with 5 additions and 0 deletions
fetcher
tests/unit/fetcher

View File

@ -82,6 +82,8 @@ class FeedFetcher implements IFeedFetcher {
$simplePie = $this->simplePieFactory->getCore();
$simplePie->set_feed_url($url);
$simplePie->enable_cache(true);
$simplePie->set_stupidly_fast(true); // disable simple pie sanitation
// we use htmlpurifier
$simplePie->set_timeout($this->fetchTimeout);
$simplePie->set_cache_location($this->cacheDirectory);
$simplePie->set_cache_duration($this->cacheDuration);

View File

@ -140,6 +140,9 @@ class FeedFetcherTest extends \OCA\AppFramework\Utility\TestUtility {
$this->core->expects($this->once())
->method('set_cache_location')
->with($this->equalTo($this->cacheDirectory));
$this->core->expects($this->once())
->method('set_stupidly_fast')
->with($this->equalTo(true));
$this->core->expects($this->once())
->method('set_cache_duration')
->with($this->equalTo($this->cacheDuration));