File tree Expand file tree Collapse file tree 2 files changed +32
-1
lines changed Expand file tree Collapse file tree 2 files changed +32
-1
lines changed Original file line number Diff line number Diff line change @@ -44,6 +44,10 @@ class Event extends Component implements HasTimezones
44
44
45
45
private ?string $ addressName = null ;
46
46
47
+ private ?string $ googleConference = null ;
48
+
49
+ private ?string $ microsoftTeams = null ;
50
+
47
51
private ?float $ lat = null ;
48
52
49
53
private ?float $ lng = null ;
@@ -164,6 +168,20 @@ public function addressName(string $name): Event
164
168
return $ this ;
165
169
}
166
170
171
+ public function googleConference (string $ googleConference ): Event
172
+ {
173
+ $ this ->googleConference = $ googleConference ;
174
+
175
+ return $ this ;
176
+ }
177
+
178
+ public function microsoftTeams (string $ microsoftTeams ): Event
179
+ {
180
+ $ this ->microsoftTeams = $ microsoftTeams ;
181
+
182
+ return $ this ;
183
+ }
184
+
167
185
public function coordinates (float $ lat , float $ lng ): Event
168
186
{
169
187
$ this ->lat = $ lat ;
@@ -393,6 +411,14 @@ private function resolveProperties(ComponentPayload $payload): self
393
411
$ this ->status ,
394
412
fn () => TextProperty::createFromEnum ('STATUS ' , $ this ->status )
395
413
)
414
+ ->optional (
415
+ $ this ->googleConference ,
416
+ fn () => TextProperty::create ('X-GOOGLE-CONFERENCE ' , $ this ->googleConference )
417
+ )
418
+ ->optional (
419
+ $ this ->microsoftTeams ,
420
+ fn () => TextProperty::create ('X-MICROSOFT-SKYPETEAMSMEETINGURL ' , $ this ->microsoftTeams )
421
+ )
396
422
->optional (
397
423
$ this ->transparent ,
398
424
fn () => TextProperty::create ('TRANSP ' , 'TRANSPARENT ' )
Original file line number Diff line number Diff line change @@ -48,17 +48,22 @@ public function it_can_set_properties_on_an_event()
48
48
->endsAt ($ dateEnds )
49
49
->address ('Antwerp ' )
50
50
->addressName ('Spatie ' )
51
+ ->googleConference ('Spatie ' )
52
+ ->googleConference ('https://meet.google.com/aaa-aaa-aaa ' )
53
+ ->microsoftTeams ('https://teams.microsoft.com/l/meetup-join/aaa-aaa-aaa ' )
51
54
->resolvePayload ();
52
55
53
56
PayloadExpectation::create ($ payload )
54
- ->expectPropertyCount (8 )
57
+ ->expectPropertyCount (10 )
55
58
->expectPropertyValue ('SUMMARY ' , 'An introduction into event sourcing ' )
56
59
->expectPropertyValue ('DESCRIPTION ' , 'By Freek Murze ' )
57
60
->expectPropertyValue ('DTSTAMP ' , $ dateCreated )
58
61
->expectPropertyValue ('DTSTART ' , $ dateStarts )
59
62
->expectPropertyValue ('DTEND ' , $ dateEnds )
60
63
->expectPropertyValue ('LOCATION ' , 'Antwerp ' )
61
64
->expectPropertyValue ('UID ' , 'Identifier here ' )
65
+ ->expectPropertyValue ('X-GOOGLE-CONFERENCE ' , 'https://meet.google.com/aaa-aaa-aaa ' )
66
+ ->expectPropertyValue ('X-MICROSOFT-SKYPETEAMSMEETINGURL ' , 'https://teams.microsoft.com/l/meetup-join/aaa-aaa-aaa ' )
62
67
->expectPropertyValue ('URL ' , 'http://example.com/pub/calendars/jsmith/mytime.ics ' );
63
68
}
64
69
You can’t perform that action at this time.
0 commit comments