Skip to content

Commit

Permalink
fixup! feat: add iMip Request Handling
Browse files Browse the repository at this point in the history
Signed-off-by: SebastianKrupinski <krupinskis05@gmail.com>
  • Loading branch information
SebastianKrupinski committed Sep 9, 2024
1 parent 5137ee9 commit 5fe8c75
Showing 1 changed file with 14 additions and 16 deletions.
30 changes: 14 additions & 16 deletions tests/lib/Calendar/ManagerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -274,8 +274,8 @@ public function testHandleImipRequestWithNoCalendars(): void {
$calendar = $this->vCalendar1a;
$calendar->add('METHOD', 'REQUEST');
// test method
$manager->handleIMipRequest($principalUri, $sender, $recipient, $calendar->serialize());

$result = $manager->handleIMipRequest($principalUri, $sender, $recipient, $calendar->serialize());
$this->assertFalse($result);
}

public function testHandleImipRequestWithNoMethod(): void {
Expand Down Expand Up @@ -305,8 +305,8 @@ public function testHandleImipRequestWithNoMethod(): void {
$recipient = 'attendee1@testing.com';
$calendar = $this->vCalendar1a;
// test method
$manager->handleIMipRequest($principalUri, $sender, $recipient, $calendar->serialize());

$result = $manager->handleIMipRequest($principalUri, $sender, $recipient, $calendar->serialize());
$this->assertFalse($result);
}

public function testHandleImipRequestWithInvalidMethod(): void {
Expand Down Expand Up @@ -337,8 +337,8 @@ public function testHandleImipRequestWithInvalidMethod(): void {
$calendar = $this->vCalendar1a;
$calendar->add('METHOD', 'CANCEL');
// test method
$manager->handleIMipRequest($principalUri, $sender, $recipient, $calendar->serialize());

$result = $manager->handleIMipRequest($principalUri, $sender, $recipient, $calendar->serialize());
$this->assertFalse($result);
}

public function testHandleImipRequestWithNoEvent(): void {
Expand Down Expand Up @@ -370,8 +370,8 @@ public function testHandleImipRequestWithNoEvent(): void {
$calendar->add('METHOD', 'REQUEST');
$calendar->remove('VEVENT');
// test method
$manager->handleIMipRequest($principalUri, $sender, $recipient, $calendar->serialize());

$result = $manager->handleIMipRequest($principalUri, $sender, $recipient, $calendar->serialize());
$this->assertFalse($result);
}

public function testHandleImipRequestWithNoUid(): void {
Expand Down Expand Up @@ -403,8 +403,8 @@ public function testHandleImipRequestWithNoUid(): void {
$calendar->add('METHOD', 'REQUEST');
$calendar->VEVENT->remove('UID');
// test method
$manager->handleIMipRequest($principalUri, $sender, $recipient, $calendar->serialize());

$result = $manager->handleIMipRequest($principalUri, $sender, $recipient, $calendar->serialize());
$this->assertFalse($result);
}

public function testHandleImipRequestWithNoAttendee(): void {
Expand Down Expand Up @@ -436,8 +436,8 @@ public function testHandleImipRequestWithNoAttendee(): void {
$calendar->add('METHOD', 'REQUEST');
$calendar->VEVENT->remove('ATTENDEE');
// test method
$manager->handleIMipRequest($principalUri, $sender, $recipient, $calendar->serialize());

$result = $manager->handleIMipRequest($principalUri, $sender, $recipient, $calendar->serialize());
$this->assertFalse($result);
}

public function testHandleImipRequestWithInvalidAttendee(): void {
Expand Down Expand Up @@ -468,8 +468,8 @@ public function testHandleImipRequestWithInvalidAttendee(): void {
$calendar = $this->vCalendar1a;
$calendar->add('METHOD', 'REQUEST');
// test method
$manager->handleIMipRequest($principalUri, $sender, $recipient, $calendar->serialize());

$result = $manager->handleIMipRequest($principalUri, $sender, $recipient, $calendar->serialize());
$this->assertFalse($result);
}

public function testHandleImipRequestWithNoMatch(): void {
Expand Down Expand Up @@ -514,7 +514,6 @@ public function testHandleImipRequestWithNoMatch(): void {
// test method
$result = $manager->handleIMipRequest($principalUri, $sender, $recipient, $calendar->serialize());
$this->assertFalse($result);

}

public function testHandleImipRequest(): void {
Expand Down Expand Up @@ -560,7 +559,6 @@ public function testHandleImipRequest(): void {
// test method
$result = $manager->handleIMipRequest($principalUri, $sender, $recipient, $calendar->serialize());
$this->assertTrue($result);

}

public function testHandleImipReplyWrongMethod(): void {
Expand Down

0 comments on commit 5fe8c75

Please sign in to comment.