diff options
author | Bernhard Posselt <dev@bernhard-posselt.com> | 2014-12-17 19:20:21 +0100 |
---|---|---|
committer | Bernhard Posselt <dev@bernhard-posselt.com> | 2015-01-18 14:06:07 +0100 |
commit | 73759298658da929fe2da06d0446a93a56859067 (patch) | |
tree | 99972490a099d31c70a0f856d681f71e194103a3 /tests/unit | |
parent | f741d1fd502687aafede499ab55c0803ad469df3 (diff) |
first stab at intelligent container
Diffstat (limited to 'tests/unit')
-rw-r--r-- | tests/unit/service/FeedServiceTest.php | 10 | ||||
-rw-r--r-- | tests/unit/service/FolderServiceTest.php | 4 | ||||
-rw-r--r-- | tests/unit/service/ItemServiceTest.php | 4 |
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)); |