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;
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 */
'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';
'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';
$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())
$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())