summaryrefslogtreecommitdiffstats
path: root/tests/unit/articleenhancer/XPathArticleEnhancerTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/unit/articleenhancer/XPathArticleEnhancerTest.php')
-rw-r--r--tests/unit/articleenhancer/XPathArticleEnhancerTest.php11
1 files changed, 9 insertions, 2 deletions
diff --git a/tests/unit/articleenhancer/XPathArticleEnhancerTest.php b/tests/unit/articleenhancer/XPathArticleEnhancerTest.php
index e594e105f..a600d6739 100644
--- a/tests/unit/articleenhancer/XPathArticleEnhancerTest.php
+++ b/tests/unit/articleenhancer/XPathArticleEnhancerTest.php
@@ -40,10 +40,17 @@ class XPathArticleEnhancerTest extends \OCA\News\Utility\TestUtility {
private $userAgent;
protected function setUp() {
- $timeout = 30;
+ $this->timeout = 30;
$this->fileFactory = $this->getMockBuilder('\OCA\News\Utility\SimplePieAPIFactory')
->disableOriginalConstructor()
->getMock();
+ $config = $this->getMockBuilder(
+ '\OCA\News\Utility\Config')
+ ->disableOriginalConstructor()
+ ->getMock();
+ $config->expects($this->any())
+ ->method('getFeedFetcherTimeout')
+ ->will($this->returnValue($this->timeout));
$this->testEnhancer = new XPathArticleEnhancer(
$this->fileFactory,
@@ -53,7 +60,7 @@ class XPathArticleEnhancerTest extends \OCA\News\Utility\TestUtility {
'/explosm.net\/all/' => '//body/*',
'/themerepublic.net/' => '//*[@class=\'post hentry\']'
),
- $this->timeout
+ $config
);
$this->redirects = 5;
$this->headers = null;