Unit tests for FileSyncService + FormAttachmentSyncService #8

Open
opened 2026-07-13 04:28:59 +00:00 by francois · 0 comments
Owner

Problem

FileSyncService and FormAttachmentSyncService have no unit tests (0 of 6 test files cover them).

Requirements

  • FileSyncServiceTest: test skip-if-exists logic, folder creation, file content writing, handleWebhook with fileId matching
  • FormAttachmentSyncServiceTest: test attachment extraction from form submissions, delegation to FileSyncService, webhook handler routing
  • Use mocks for GhlApiService, IRootFolder, SyncMappingService, IConfig

Files to create

  • tests/Unit/Service/FileSyncServiceTest.php
  • tests/Unit/Service/FormAttachmentSyncServiceTest.php

Acceptance

  • 10+ tests covering FileSyncService (download, store, skip, folder creation)
  • 5+ tests covering FormAttachmentSyncService (extraction, delegation, webhook)
  • All tests pass with existing test suite
## Problem FileSyncService and FormAttachmentSyncService have no unit tests (0 of 6 test files cover them). ## Requirements - FileSyncServiceTest: test skip-if-exists logic, folder creation, file content writing, handleWebhook with fileId matching - FormAttachmentSyncServiceTest: test attachment extraction from form submissions, delegation to FileSyncService, webhook handler routing - Use mocks for GhlApiService, IRootFolder, SyncMappingService, IConfig ## Files to create - tests/Unit/Service/FileSyncServiceTest.php - tests/Unit/Service/FormAttachmentSyncServiceTest.php ## Acceptance - [ ] 10+ tests covering FileSyncService (download, store, skip, folder creation) - [ ] 5+ tests covering FormAttachmentSyncService (extraction, delegation, webhook) - [ ] All tests pass with existing test suite
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
partage/ghl-nextcloud-integration#8
No description provided.