Skip to content

test(functions,models): write unit tests for exporter, importer, sunrise functions and base-model, interfaces, traits #704

@superdav42

Description

@superdav42

Summary

Several files still lack unit test coverage. Add PHPUnit tests for each.

Files to test

Functions:

  • inc/functions/exporter.php (453 lines) — data export utilities
  • inc/functions/importer.php (300 lines) — data import utilities
  • inc/functions/sunrise.php (101 lines) — sunrise/domain mapping functions

Models:

  • inc/models/class-base-model.php (1178 lines) — base model class
  • inc/models/interfaces/interface-billable.php — billable interface
  • inc/models/interfaces/interface-limitable.php — limitable interface
  • inc/models/interfaces/interface-notable.php — notable interface
  • inc/models/traits/trait-billable.php — billable trait
  • inc/models/traits/trait-limitable.php — limitable trait
  • inc/models/traits/trait-notable.php — notable trait

Integrations:

  • inc/integrations/providers/cloudflare.php — Cloudflare domain mapping provider

Acceptance criteria

  • Test file created for each class/file in the appropriate test directory
  • Each test covers main public methods and error paths
  • All tests pass on PHP 8.2, 8.3, 8.4, 8.5
  • No regressions in existing tests

aidevops.sh v3.5.184 plugin for OpenCode v1.3.0 with claude-sonnet-4-6 spent 13m and 36,697 tokens on this as a headless worker.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions