mirror of
https://github.com/nextcloud/server.git
synced 2026-04-22 23:03:00 -04:00
Fix errors in calendar tests saying function handleIMipMessage does not exists on ICreateFromString
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
This commit is contained in:
parent
48358bb78f
commit
7cf1dec842
1 changed files with 11 additions and 4 deletions
|
|
@ -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())
|
||||
|
|
|
|||
Loading…
Reference in a new issue