Skip to content

Commit 4606758

Browse files
fixup! feat: Calendar Export
Signed-off-by: SebastianKrupinski <krupinskis05@gmail.com>
1 parent ee14b6b commit 4606758

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

apps/dav/tests/unit/CalDAV/CalendarImplTest.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -294,10 +294,12 @@ public function testExport(): void {
294294
->method('exportCalendar')
295295
->with(1, $this->backend::CALENDAR_TYPE_CALENDAR, null)
296296
->willReturn($this->mockExportGenerator());
297+
297298
// Act
298299
foreach ($this->calendarImpl->export(null) as $entry) {
299300
$exported[] = $entry;
300301
}
302+
301303
// Assert
302304
$this->assertCount(1, $exported, 'Invalid exported items count');
303305
}

apps/dav/tests/unit/CalDAV/Export/ExportServiceTest.php

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ protected function mockGenerator(): Generator {
3838
}
3939

4040
public function testExport(): void {
41-
// arrange
41+
// Arrange
4242
// construct calendar with a 1 hour event and same start/end time zones
4343
$vCalendar = new VCalendar();
4444
/** @var \Sabre\VObject\Component\VEvent $vEvent */
@@ -62,12 +62,14 @@ public function testExport(): void {
6262
->method('export')
6363
->with($options)
6464
->willReturn($this->mockGenerator());
65-
// act
65+
66+
// Act
6667
$document = '';
6768
foreach ($this->service->export($this->calendar, $options) as $chunk) {
6869
$document .= $chunk;
6970
}
70-
// assert
71+
72+
// Assert
7173
$this->assertStringContainsString('BEGIN:VCALENDAR', $document, 'Exported document calendar start missing');
7274
$this->assertStringContainsString('BEGIN:VEVENT', $document, 'Exported document event start missing');
7375
$this->assertStringContainsString('END:VEVENT', $document, 'Exported document event end missing');

0 commit comments

Comments
 (0)