$this->time->expects(self::once())
->method('getTime')
- ->willReturn(202208219);
+ ->willReturn(1628374233);
$manager->expects(self::once())
->method('getCalendarsForPrincipal')
->willReturn([]);
$this->time->expects(self::once())
->method('getTime')
- ->willReturn(202208219);
+ ->willReturn(1628374233);
$manager->expects(self::once())
->method('getCalendarsForPrincipal')
->willReturn([$calendar]);
$this->time->expects(self::once())
->method('getTime')
- ->willReturn(202208219);
+ ->willReturn(1628374233);
$manager->expects(self::once())
->method('getCalendarsForPrincipal')
->willReturn([$calendar]);
$recipient = 'pierre@general-store.com';
$replyTo = null;
$calendarData = $this->getVCalendarCancel();
- $calendarData->VEVENT->METHOD = 'REQUEST';
+ $calendarData->METHOD = 'REQUEST';
$this->logger->expects(self::once())
->method('warning');
$recipient = 'leah@general-store.com';
$replyTo = null;
$calendarData = $this->getVCalendarCancel();
- $calendarData->VEVENT->METHOD = 'CANCEL';
$this->logger->expects(self::once())
->method('warning');
$this->time->expects(self::once())
->method('getTime')
- ->willReturn(202208219);
+ ->willReturn(1628374233);
$manager->expects(self::once())
->method('getCalendarsForPrincipal')
->with($principalUri)
$this->logger->expects(self::once())
->method('warning');
- $result = $this->manager->handleIMipCancel($principalUri, $sender, $replyTo, $recipient, $calendarData->serialize());
- $this->assertTrue($result);
+ $result = $manager->handleIMipCancel($principalUri, $sender, $replyTo, $recipient, $calendarData->serialize());
+ $this->assertFalse($result);
}
public function testHandleImipCancelOrganiserInReplyTo(): void {
$replyTo = 'linus@stardew-tent-living.com';
$calendar = $this->createMock(ICreateFromString::class);
$calendarData = $this->getVCalendarCancel();
- $calendarData->VEVENT->METHOD = 'CANCEL';
$this->time->expects(self::once())
->method('getTime')
- ->willReturn(202208219);
+ ->willReturn(1628374233);
$manager->expects(self::once())
->method('getCalendarsForPrincipal')
->with($principalUri)
$calendar->expects(self::once())
->method('handleIMipMessage')
->with('testname.ics', $calendarData->serialize());
- $result = $this->manager->handleIMipCancel($principalUri, $sender, $replyTo, $recipient, $calendarData->serialize());
- $this->assertFalse($result);
+ $result = $manager->handleIMipCancel($principalUri, $sender, $replyTo, $recipient, $calendarData->serialize());
+ $this->assertTrue($result);
}
public function testHandleImipCancel(): void {
$replyTo = null;
$calendar = $this->createMock(ICreateFromString::class);
$calendarData = $this->getVCalendarCancel();
- $calendarData->VEVENT->METHOD = 'CANCEL';
$this->time->expects(self::once())
->method('getTime')
- ->willReturn(202208219);
+ ->willReturn(1628374233);
$manager->expects(self::once())
->method('getCalendarsForPrincipal')
->with($principalUri)
$calendar->expects(self::once())
->method('handleIMipMessage')
->with('testname.ics', $calendarData->serialize());
- $result = $this->manager->handleIMipCancel($principalUri, $sender, $replyTo, $recipient, $calendarData->serialize());
- $this->assertFalse($result);
+ $result = $manager->handleIMipCancel($principalUri, $sender, $replyTo, $recipient, $calendarData->serialize());
+ $this->assertTrue($result);
}
private function getVCalendarReply(): Document {