$iTipMessage->component = 'VEVENT';
$iTipMessage->sequence = isset($vEvent->{'SEQUENCE'}) ? (int)$vEvent->{'SEQUENCE'}->getValue() : 0;
$iTipMessage->message = $vObject;
- $schedulingPlugin->scheduleLocalDelivery($iTipMessage);
+ $server->server->emit('schedule', [$iTipMessage]);
}
public function getInvitationResponseServer(): InvitationResponseServer {
$schedulingPlugin = $this->createMock(Plugin::class);
$iTipMessage = $this->getITipMessage($message);
$iTipMessage->recipient = "mailto:lewis@stardew-tent-living.com";
- $schedulingPlugin->expects(self::once())
- ->method('scheduleLocalDelivery')
- ->with($iTipMessage);
$server = $this->createMock(Server::class);
$server->expects($this->any())
['acl', $aclPlugin],
['caldav-schedule', $schedulingPlugin]
]);
+ $server->expects(self::once())
+ ->method('emit');
$invitationResponseServer = $this->createPartialMock(InvitationResponseServer::class, ['getServer', 'isExternalAttendee']);
$invitationResponseServer->server = $server;
['acl', $aclPlugin],
['caldav-schedule', $schedulingPlugin]
]);
+ $server->expects(self::never())
+ ->method('emit');
$invitationResponseServer = $this->createPartialMock(InvitationResponseServer::class, ['getServer']);
$invitationResponseServer->server = $server;