| Conditions | 1 |
| Paths | 1 |
| Total Lines | 25 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 25 | public function testMinimalEvent() |
||
| 26 | { |
||
| 27 | $currentTime = Timestamp::fromDateTimeInterface( |
||
| 28 | DateTimeImmutable::createFromFormat( |
||
| 29 | 'Y-m-d H:i:s', |
||
| 30 | '2019-11-10 11:22:33', |
||
| 31 | new DateTimeZone('UTC') |
||
| 32 | ) |
||
| 33 | ); |
||
| 34 | $event = Event::create(UniqueIdentifier::fromString('event1')) |
||
| 35 | ->touch($currentTime) |
||
| 36 | ->withSummary('Lorem Summary') |
||
| 37 | ->withDescription('Lorem Description'); |
||
| 38 | |||
| 39 | $expected = implode(Component::LINE_SEPARATOR, [ |
||
| 40 | 'BEGIN:VEVENT', |
||
| 41 | 'UID:event1', |
||
| 42 | 'DTSTAMP:20191110T112233Z', |
||
| 43 | 'SUMMARY:Lorem Summary', |
||
| 44 | 'DESCRIPTION:Lorem Description', |
||
| 45 | 'END:VEVENT', |
||
| 46 | ]); |
||
| 47 | |||
| 48 | self::assertSame($expected, (string) (new EventFactory())->createComponent($event)); |
||
| 49 | } |
||
| 50 | } |
||
| 51 |