@@ -408,7 +408,20 @@ 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+ /**
419+ * @dataProvider provideDeepLinkData
420+ */
421+ public function testGetDeepLinkToCalendarApp (
422+ string $ principalUri ,
423+ string $ expectedBase64DavUrl ,
424+ ): void {
412425 $ this ->urlGenerator ->expects ($ this ->once ())
413426 ->method ('linkTo ' )
414427 ->with ('' , 'remote.php ' )
@@ -419,10 +432,14 @@ public function testGetDeepLinkToCalendarApp(): void {
419432 ->willReturn ('link-to-route-calendar/ ' );
420433 $ this ->urlGenerator ->expects ($ this ->once ())
421434 ->method ('getAbsoluteURL ' )
422- ->with (' link-to-route-calendar/edit/bGluay10by1yZW1vdGUucGhwL2Rhdi9jYWxlbmRhcnMvam9obi5kb2UvZm9vL2Jhci5pY3M= ' )
435+ ->with (" link-to-route-calendar/edit/ $ expectedBase64DavUrl " )
423436 ->willReturn ('absolute-url-to-route ' );
424437
425- $ actual = self ::invokePrivate ($ this ->provider , 'getDeepLinkToCalendarApp ' , ['principals/users/john.doe ' , 'foo ' , 'bar.ics ' ]);
438+ $ actual = self ::invokePrivate ($ this ->provider , 'getDeepLinkToCalendarApp ' , [
439+ $ principalUri ,
440+ 'foo ' ,
441+ 'bar.ics ' ,
442+ ]);
426443
427444 $ this ->assertEquals ('absolute-url-to-route ' , $ actual );
428445 }
0 commit comments