@@ -408,7 +408,18 @@ public function testSearch(): void {
408408 $ this ->assertFalse ($ result2Data ['rounded ' ]);
409409 }
410410
411- public function testGetDeepLinkToCalendarApp (): void {
411+ public static function provideDeepLinkData (): array {
412+ return [
413+ ['principals/users/john.doe ' , 'bGluay10by1yZW1vdGUucGhwL2Rhdi9jYWxlbmRhcnMvam9obi5kb2UvZm9vL2Jhci5pY3M= ' ],
414+ ['principals/users/John Doe ' , 'bGluay10by1yZW1vdGUucGhwL2Rhdi9jYWxlbmRhcnMvSm9obiUyMERvZS9mb28vYmFyLmljcw== ' ],
415+ ];
416+ }
417+
418+ #[DataProvider('provideDeepLinkData ' )]
419+ public function testGetDeepLinkToCalendarApp (
420+ string $ principalUri ,
421+ string $ expectedBase64DavUrl ,
422+ ): void {
412423 $ this ->urlGenerator ->expects ($ this ->once ())
413424 ->method ('linkTo ' )
414425 ->with ('' , 'remote.php ' )
@@ -419,10 +430,14 @@ public function testGetDeepLinkToCalendarApp(): void {
419430 ->willReturn ('link-to-route-calendar/ ' );
420431 $ this ->urlGenerator ->expects ($ this ->once ())
421432 ->method ('getAbsoluteURL ' )
422- ->with (' link-to-route-calendar/edit/bGluay10by1yZW1vdGUucGhwL2Rhdi9jYWxlbmRhcnMvam9obi5kb2UvZm9vL2Jhci5pY3M= ' )
433+ ->with (" link-to-route-calendar/edit/ $ expectedBase64DavUrl " )
423434 ->willReturn ('absolute-url-to-route ' );
424435
425- $ actual = self ::invokePrivate ($ this ->provider , 'getDeepLinkToCalendarApp ' , ['principals/users/john.doe ' , 'foo ' , 'bar.ics ' ]);
436+ $ actual = self ::invokePrivate ($ this ->provider , 'getDeepLinkToCalendarApp ' , [
437+ $ principalUri ,
438+ 'foo ' ,
439+ 'bar.ics ' ,
440+ ]);
426441
427442 $ this ->assertEquals ('absolute-url-to-route ' , $ actual );
428443 }
0 commit comments