diff options
author | Côme Chilliet <come.chilliet@nextcloud.com> | 2022-09-05 18:09:49 +0200 |
---|---|---|
committer | Côme Chilliet <come.chilliet@nextcloud.com> | 2022-09-05 18:09:49 +0200 |
commit | 0b37d8989396b96205ba6721a59c4b5ff5ce5fde (patch) | |
tree | bda6b7f93c32003683af6cb4f2fce5493b786017 /tests | |
parent | 15c45b5ef579122563e17cdf3e0972de64dca99f (diff) | |
download | nextcloud-server-0b37d8989396b96205ba6721a59c4b5ff5ce5fde.tar.gz nextcloud-server-0b37d8989396b96205ba6721a59c4b5ff5ce5fde.zip |
Fix Calendar tests mocking a non-existant method.
There is no ITimeFactory::getTimestamp method, only getTime
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/lib/Calendar/ManagerTest.php | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/tests/lib/Calendar/ManagerTest.php b/tests/lib/Calendar/ManagerTest.php index 8b99c21ae41..824d9344a6b 100644 --- a/tests/lib/Calendar/ManagerTest.php +++ b/tests/lib/Calendar/ManagerTest.php @@ -251,7 +251,7 @@ class ManagerTest extends TestCase { $this->logger->expects(self::once()) ->method('warning'); $this->time->expects(self::never()) - ->method('getTimestamp'); + ->method('getTime'); $result = $this->manager->handleIMipReply($principalUri, $sender, $recipient, $calendarData->serialize()); $this->assertFalse($result); @@ -266,7 +266,7 @@ class ManagerTest extends TestCase { $this->logger->expects(self::once()) ->method('warning'); $this->time->expects(self::never()) - ->method('getTimestamp'); + ->method('getTime'); $result = $this->manager->handleIMipReply($principalUri, $sender, $recipient, $calendarData->serialize()); $this->assertFalse($result); @@ -280,7 +280,7 @@ class ManagerTest extends TestCase { $calendarData->VEVENT->DTSTART = new \DateTime('2013-04-07'); // set to in the past $this->time->expects(self::once()) - ->method('getTimestamp') + ->method('getTime') ->willReturn(time()); $this->logger->expects(self::once()) @@ -308,7 +308,7 @@ class ManagerTest extends TestCase { $calendarData = $this->getVCalendarReply(); $this->time->expects(self::once()) - ->method('getTimestamp') + ->method('getTime') ->willReturn(202208219); $manager->expects(self::once()) ->method('getCalendarsForPrincipal') @@ -339,7 +339,7 @@ class ManagerTest extends TestCase { $calendarData = $this->getVCalendarReply(); $this->time->expects(self::once()) - ->method('getTimestamp') + ->method('getTime') ->willReturn(202208219); $manager->expects(self::once()) ->method('getCalendarsForPrincipal') @@ -375,7 +375,7 @@ class ManagerTest extends TestCase { $calendarData = $this->getVCalendarReply(); $this->time->expects(self::once()) - ->method('getTimestamp') + ->method('getTime') ->willReturn(202208219); $manager->expects(self::once()) ->method('getCalendarsForPrincipal') @@ -402,7 +402,7 @@ class ManagerTest extends TestCase { $this->logger->expects(self::once()) ->method('warning'); $this->time->expects(self::never()) - ->method('getTimestamp'); + ->method('getTime'); $result = $this->manager->handleIMipCancel($principalUri, $sender, $replyTo, $recipient, $calendarData->serialize()); $this->assertFalse($result); @@ -419,7 +419,7 @@ class ManagerTest extends TestCase { $this->logger->expects(self::once()) ->method('warning'); $this->time->expects(self::never()) - ->method('getTimestamp'); + ->method('getTime'); $result = $this->manager->handleIMipCancel($principalUri, $sender, $replyTo, $recipient, $calendarData->serialize()); $this->assertFalse($result); @@ -434,7 +434,7 @@ class ManagerTest extends TestCase { $calendarData->VEVENT->DTSTART = new \DateTime('2013-04-07'); // set to in the past $this->time->expects(self::once()) - ->method('getTimestamp') + ->method('getTime') ->willReturn(time()); $this->logger->expects(self::once()) ->method('warning'); @@ -462,7 +462,7 @@ class ManagerTest extends TestCase { $calendarData = $this->getVCalendarCancel(); $this->time->expects(self::once()) - ->method('getTimestamp') + ->method('getTime') ->willReturn(202208219); $manager->expects(self::once()) ->method('getCalendarsForPrincipal') @@ -496,7 +496,7 @@ class ManagerTest extends TestCase { $calendarData->VEVENT->METHOD = 'CANCEL'; $this->time->expects(self::once()) - ->method('getTimestamp') + ->method('getTime') ->willReturn(202208219); $manager->expects(self::once()) ->method('getCalendarsForPrincipal') @@ -533,7 +533,7 @@ class ManagerTest extends TestCase { $calendarData->VEVENT->METHOD = 'CANCEL'; $this->time->expects(self::once()) - ->method('getTimestamp') + ->method('getTime') ->willReturn(202208219); $manager->expects(self::once()) ->method('getCalendarsForPrincipal') |