diff options
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') |