1616use OCP \AppFramework \Utility \ITimeFactory ;
1717use OCP \IConfig ;
1818use OCP \IDBConnection ;
19+ use OCP \IUserManager ;
1920use OCP \L10N \IFactory as L10NFactory ;
2021use OCP \Security \ISecureRandom ;
2122use PHPUnit \Framework \MockObject \MockObject ;
@@ -48,6 +49,9 @@ class IMipServiceTest extends TestCase {
4849 /** @var IMipService */
4950 private $ service ;
5051
52+ /** @var IUserManager|MockObject */
53+ private $ userManager ;
54+
5155 /** @var VCalendar */
5256 private $ vCalendar1a ;
5357 /** @var VCalendar */
@@ -67,6 +71,7 @@ protected function setUp(): void {
6771 $ this ->l10nFactory = $ this ->createMock (L10NFactory::class);
6872 $ this ->l10n = $ this ->createMock (LazyL10N::class);
6973 $ this ->timeFactory = $ this ->createMock (ITimeFactory::class);
74+ $ this ->userManager = $ this ->createMock (IUserManager::class);
7075 $ this ->l10nFactory ->expects (self ::once ())
7176 ->method ('findGenericLanguage ' )
7277 ->willReturn ('en ' );
@@ -80,11 +85,13 @@ protected function setUp(): void {
8085 $ this ->db ,
8186 $ this ->random ,
8287 $ this ->l10nFactory ,
83- $ this ->timeFactory
88+ $ this ->timeFactory ,
89+ $ this ->userManager
8490 );
8591
8692 // construct calendar with a 1 hour event and same start/end time zones
8793 $ this ->vCalendar1a = new VCalendar ();
94+ /** @var \Sabre\VObject\Component\VEvent $vEvent */
8895 $ vEvent = $ this ->vCalendar1a ->add ('VEVENT ' , []);
8996 $ vEvent ->UID ->setValue ('96a0e6b1-d886-4a55-a60d-152b31401dcc ' );
9097 $ vEvent ->add ('DTSTART ' , '20240701T080000 ' , ['TZID ' => 'America/Toronto ' ]);
@@ -101,6 +108,7 @@ protected function setUp(): void {
101108
102109 // construct calendar with a 1 hour event and different start/end time zones
103110 $ this ->vCalendar1b = new VCalendar ();
111+ /** @var \Sabre\VObject\Component\VEvent $vEvent */
104112 $ vEvent = $ this ->vCalendar1b ->add ('VEVENT ' , []);
105113 $ vEvent ->UID ->setValue ('96a0e6b1-d886-4a55-a60d-152b31401dcc ' );
106114 $ vEvent ->add ('DTSTART ' , '20240701T080000 ' , ['TZID ' => 'America/Toronto ' ]);
@@ -118,9 +126,11 @@ protected function setUp(): void {
118126 // construct calendar with a full day event
119127 $ this ->vCalendar2 = new VCalendar ();
120128 // time zone component
129+ /** @var \Sabre\VObject\Component\VTimeZone $vTimeZone */
121130 $ vTimeZone = $ this ->vCalendar2 ->add ('VTIMEZONE ' );
122131 $ vTimeZone ->add ('TZID ' , 'America/Toronto ' );
123132 // event component
133+ /** @var \Sabre\VObject\Component\VEvent $vEvent */
124134 $ vEvent = $ this ->vCalendar2 ->add ('VEVENT ' , []);
125135 $ vEvent ->UID ->setValue ('96a0e6b1-d886-4a55-a60d-152b31401dcc ' );
126136 $ vEvent ->add ('DTSTART ' , '20240701 ' );
@@ -138,9 +148,11 @@ protected function setUp(): void {
138148 // construct calendar with a multi day event
139149 $ this ->vCalendar3 = new VCalendar ();
140150 // time zone component
151+ /** @var \Sabre\VObject\Component\VTimeZone $vTimeZone */
141152 $ vTimeZone = $ this ->vCalendar3 ->add ('VTIMEZONE ' );
142153 $ vTimeZone ->add ('TZID ' , 'America/Toronto ' );
143154 // event component
155+ /** @var \Sabre\VObject\Component\VEvent $vEvent */
144156 $ vEvent = $ this ->vCalendar3 ->add ('VEVENT ' , []);
145157 $ vEvent ->UID ->setValue ('96a0e6b1-d886-4a55-a60d-152b31401dcc ' );
146158 $ vEvent ->add ('DTSTART ' , '20240701 ' );
0 commit comments