diff options
author | Bernhard Posselt <dev@bernhard-posselt.com> | 2016-07-23 18:34:17 +0200 |
---|---|---|
committer | Bernhard Posselt <dev@bernhard-posselt.com> | 2016-07-23 18:34:17 +0200 |
commit | 9b1fe46fe995bc103d3c5cfa9a552d050ff0ead8 (patch) | |
tree | 7b86abb65272df89f61e849a08edef5326207b8a /tests/unit/service/ItemServiceTest.php | |
parent | b88d42074dcd0842d0db3ca8ed24b0b9ccb78a7a (diff) |
Add timestamps for all entities in milisecond unix time format
Diffstat (limited to 'tests/unit/service/ItemServiceTest.php')
-rw-r--r-- | tests/unit/service/ItemServiceTest.php | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/tests/unit/service/ItemServiceTest.php b/tests/unit/service/ItemServiceTest.php index e9bf47490..e562757f4 100644 --- a/tests/unit/service/ItemServiceTest.php +++ b/tests/unit/service/ItemServiceTest.php @@ -34,12 +34,15 @@ class ItemServiceTest extends \PHPUnit_Framework_TestCase { protected function setUp(){ $this->time = 222; - $this->timeFactory = $this->getMockBuilder('\OCP\AppFramework\Utility\ITimeFactory') + $this->timeFactory = $this->getMockBuilder('\OCA\News\Utility\Time') ->disableOriginalConstructor() ->getMock(); $this->timeFactory->expects($this->any()) ->method('getTime') ->will($this->returnValue($this->time)); + $this->timeFactory->expects($this->any()) + ->method('getMicroTime') + ->will($this->returnValue($this->time)); $this->mapper = $this->getMockBuilder('\OCA\News\Db\ItemMapper') ->disableOriginalConstructor() ->getMock(); @@ -219,7 +222,6 @@ class ItemServiceTest extends \PHPUnit_Framework_TestCase { $expectedItem->setStatus(128); $expectedItem->setStarred(); $expectedItem->setId($itemId); - $expectedItem->setLastModified($this->time); $this->mapper->expects($this->once()) ->method('findByGuidHash') @@ -253,7 +255,6 @@ class ItemServiceTest extends \PHPUnit_Framework_TestCase { $expectedItem->setStatus(128); $expectedItem->setUnstarred(); $expectedItem->setId($itemId); - $expectedItem->setLastModified($this->time); $this->mapper->expects($this->once()) ->method('findByGuidHash') |