summaryrefslogtreecommitdiffstats
path: root/tests/unit/articleenhancer
diff options
context:
space:
mode:
authorBernhard Posselt <dev@bernhard-posselt.com>2014-04-09 16:10:48 +0200
committerBernhard Posselt <dev@bernhard-posselt.com>2014-04-09 22:52:27 +0200
commit643fa4624dd7ba2db1349f16131bf330aeee3387 (patch)
tree73bc787a3eb1ed5f53ab932187546c980ac50bb5 /tests/unit/articleenhancer
parentefe9db1e064c9736fe35c27040ee60fa28ca8d4d (diff)
port to internal controller, some routes are still broken
Diffstat (limited to 'tests/unit/articleenhancer')
-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;