diff options
author | Julius Härtl <jus@bitgrid.net> | 2022-12-07 20:39:41 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-12-07 20:39:41 +0100 |
commit | 3c8fb59fa46cce8e570e0b7d6965ce98a1c0ef74 (patch) | |
tree | 7bcfd3771b257260d8be4bfcbe9e1c7751a3220e /tests | |
parent | 744126aed7333a9ab4e03ba5d045f92f6c42f2dc (diff) | |
parent | 7cf1dec84279a86f72631230813d1bf09dca4b3e (diff) | |
download | nextcloud-server-3c8fb59fa46cce8e570e0b7d6965ce98a1c0ef74.tar.gz nextcloud-server-3c8fb59fa46cce8e570e0b7d6965ce98a1c0ef74.zip |
Merge pull request #35620 from nextcloud/fix/fix-calendar-imip-tests
Diffstat (limited to 'tests')
-rw-r--r-- | tests/lib/Calendar/ManagerTest.php | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/tests/lib/Calendar/ManagerTest.php b/tests/lib/Calendar/ManagerTest.php index ba30be1b548..540fd5c0c69 100644 --- a/tests/lib/Calendar/ManagerTest.php +++ b/tests/lib/Calendar/ManagerTest.php @@ -28,6 +28,7 @@ use OC\Calendar\Manager; use OCP\AppFramework\Utility\ITimeFactory; use OCP\Calendar\ICalendar; use OCP\Calendar\ICreateFromString; +use OCP\Calendar\IHandleImipMessage; use PHPUnit\Framework\MockObject\MockObject; use Psr\Container\ContainerInterface; use Psr\Log\LoggerInterface; @@ -35,6 +36,12 @@ use Sabre\VObject\Document; use Sabre\VObject\Reader; use Test\TestCase; +/* + * This allows us to create Mock object supporting both interfaces + */ +interface ICreateFromStringAndHandleImipMessage extends ICreateFromString, IHandleImipMessage { +} + class ManagerTest extends TestCase { /** @var Coordinator|MockObject */ @@ -334,7 +341,7 @@ class ManagerTest extends TestCase { 'getCalendarsForPrincipal' ]) ->getMock(); - $calendar = $this->createMock(ICreateFromString::class); + $calendar = $this->createMock(ICreateFromStringAndHandleImipMessage::class); $principalUri = 'principals/user/linus'; $sender = 'pierre@general-store.com'; $recipient = 'linus@stardew-tent-living.com'; @@ -371,7 +378,7 @@ class ManagerTest extends TestCase { 'getCalendarsForPrincipal' ]) ->getMock(); - $calendar = $this->createMock(ICreateFromString::class); + $calendar = $this->createMock(ICreateFromStringAndHandleImipMessage::class); $principalUri = 'principals/user/linus'; $sender = 'pierre@general-store.com'; $recipient = 'linus@stardew-tent-living.com'; @@ -495,7 +502,7 @@ class ManagerTest extends TestCase { $sender = 'clint@stardew-blacksmiths.com'; $recipient = 'pierre@general-store.com'; $replyTo = 'linus@stardew-tent-living.com'; - $calendar = $this->createMock(ICreateFromString::class); + $calendar = $this->createMock(ICreateFromStringAndHandleImipMessage::class); $calendarData = $this->getVCalendarCancel(); $this->time->expects(self::once()) @@ -532,7 +539,7 @@ class ManagerTest extends TestCase { $sender = 'linus@stardew-tent-living.com'; $recipient = 'pierre@general-store.com'; $replyTo = null; - $calendar = $this->createMock(ICreateFromString::class); + $calendar = $this->createMock(ICreateFromStringAndHandleImipMessage::class); $calendarData = $this->getVCalendarCancel(); $this->time->expects(self::once()) |