@@ -39,7 +39,7 @@ protected function setUp(): void {
3939 $ this ->backend = $ this ->createMock (CalDavBackend::class);
4040 $ this ->calendar = $ this ->createMock (Calendar::class);
4141 $ this ->calendarInfo = [
42- 'id ' => ' fancy_id_123 ' ,
42+ 'id ' => 123 ,
4343 '{DAV:}displayname ' => 'user readable name 123 ' ,
4444 '{http://apple.com/ns/ical/}calendar-color ' => '#AABBCC ' ,
4545 'uri ' => '/this/is/a/uri ' ,
@@ -71,7 +71,7 @@ protected function setUp(): void {
7171
7272
7373 public function testGetKey (): void {
74- $ this ->assertEquals ($ this ->calendarImpl ->getKey (), 'fancy_id_123 ' );
74+ $ this ->assertEquals ($ this ->calendarImpl ->getKey (), '123 ' );
7575 }
7676
7777 public function testGetDisplayname (): void {
@@ -82,6 +82,18 @@ public function testGetDisplayColor(): void {
8282 $ this ->assertEquals ($ this ->calendarImpl ->getDisplayColor (), '#AABBCC ' );
8383 }
8484
85+ public function testGetPublicToken (): void {
86+ $ publicToken = $ this ->calendar ->setPublishStatus (true );
87+
88+ $ this ->assertEquals ($ this ->calendarImpl ->getPublicToken (), $ publicToken );
89+ }
90+
91+ public function testGetPublicTokenWithPrivateCalendar (): void {
92+ $ this ->calendar ->setPublishStatus (false );
93+
94+ $ this ->assertNull ($ this ->calendarImpl ->getPublicToken ());
95+ }
96+
8597 public function testSearch (): void {
8698 $ this ->backend ->expects ($ this ->once ())
8799 ->method ('search ' )
0 commit comments