plugin = new Plugin(); } public static function linkProvider(): array { return [ [ 'principals/users/MyUserName', 'calendars/MyUserName', ], [ 'principals/calendar-resources/Resource-ABC', 'system-calendars/calendar-resources/Resource-ABC', ], [ 'principals/calendar-rooms/Room-ABC', 'system-calendars/calendar-rooms/Room-ABC', ], ]; } #[\PHPUnit\Framework\Attributes\DataProvider('linkProvider')] public function testGetCalendarHomeForPrincipal(string $input, string $expected): void { $this->assertSame($expected, $this->plugin->getCalendarHomeForPrincipal($input)); } public function testGetCalendarHomeForUnknownPrincipal(): void { $this->assertNull($this->plugin->getCalendarHomeForPrincipal('FOO/BAR/BLUB')); } }