summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/unit/service/FeedServiceTest.php10
-rw-r--r--tests/unit/service/FolderServiceTest.php4
-rw-r--r--tests/unit/service/ItemServiceTest.php4
3 files changed, 14 insertions, 4 deletions
diff --git a/tests/unit/service/FeedServiceTest.php b/tests/unit/service/FeedServiceTest.php
index 3a53a0122..2ab135d2b 100644
--- a/tests/unit/service/FeedServiceTest.php
+++ b/tests/unit/service/FeedServiceTest.php
@@ -48,7 +48,9 @@ class FeedServiceTest extends \PHPUnit_Framework_TestCase {
$this->loggerParams = ['hi'];
$this->time = 222;
$this->autoPurgeMinimumInterval = 10;
- $timeFactory = $this->getMock('TimeFactory', ['getTime']);
+ $timeFactory = $this->getMockBuilder('\OCP\AppFramework\Utility\ITimeFactory')
+ ->disableOriginalConstructor()
+ ->getMock();
$timeFactory->expects($this->any())
->method('getTime')
->will($this->returnValue($this->time));
@@ -71,7 +73,11 @@ class FeedServiceTest extends \PHPUnit_Framework_TestCase {
->getMockBuilder('\OCA\News\ArticleEnhancer\Enhancer')
->disableOriginalConstructor()
->getMock();
- $this->purifier = $this->getMock('purifier', ['purify']);
+
+ $this->purifier = $this
+ ->getMockBuilder('\HTMLPurifier')
+ ->disableOriginalConstructor()
+ ->getMock();
$config = $this->getMockBuilder(
'\OCA\News\Config\Config')
->disableOriginalConstructor()
diff --git a/tests/unit/service/FolderServiceTest.php b/tests/unit/service/FolderServiceTest.php
index 927cd1229..c6e17bdbd 100644
--- a/tests/unit/service/FolderServiceTest.php
+++ b/tests/unit/service/FolderServiceTest.php
@@ -30,7 +30,9 @@ class FolderServiceTest extends \PHPUnit_Framework_TestCase {
->disableOriginalConstructor()
->getMock();
$this->time = 222;
- $timeFactory = $this->getMock('TimeFactory', ['getTime']);
+ $timeFactory = $this->getMockBuilder('\OCP\AppFramework\Utility\ITimeFactory')
+ ->disableOriginalConstructor()
+ ->getMock();
$timeFactory->expects($this->any())
->method('getTime')
->will($this->returnValue($this->time));
diff --git a/tests/unit/service/ItemServiceTest.php b/tests/unit/service/ItemServiceTest.php
index 1b6eb6c00..d7bf70dc9 100644
--- a/tests/unit/service/ItemServiceTest.php
+++ b/tests/unit/service/ItemServiceTest.php
@@ -34,7 +34,9 @@ class ItemServiceTest extends \PHPUnit_Framework_TestCase {
protected function setUp(){
$this->time = 222;
- $this->timeFactory = $this->getMock('TimeFactory', ['getTime']);
+ $this->timeFactory = $this->getMockBuilder('\OCP\AppFramework\Utility\ITimeFactory')
+ ->disableOriginalConstructor()
+ ->getMock();
$this->timeFactory->expects($this->any())
->method('getTime')
->will($this->returnValue($this->time));