Skip to content

[#15] Mock asset foundation: TDD plan + Assets service scaffold#24

Draft
joshuapease wants to merge 3 commits into
mainfrom
jp/15-asset-mock-feature
Draft

[#15] Mock asset foundation: TDD plan + Assets service scaffold#24
joshuapease wants to merge 3 commits into
mainfrom
jp/15-asset-mock-feature

Conversation

@joshuapease

Copy link
Copy Markdown
Contributor

First PR in the Mock Asset feature series (#15). This is the standalone
foundation the plan designates to land before feature work, plus the TDD
rework of the plan itself.

What's here

Plan rework (docs/plans/2026-05-25-feat-mock-asset-service-plan.md)

  • Restructures the 4 phases into 12 test-first implementation units (U1–U12)
  • Adds a Testing Strategy section (unit/functional split, harness affordances,
    the few manual-only items: Imager X Pro AC8, Imagick-absent NFR4)
  • Maps every AC/NFR to a concrete Codeception test file
  • Reframes Phase 1 as greenfield scaffolding — an audit found the feature is
    entirely unscaffolded (no WIP MockAsset to "fix" as the original implied)
  • Notes ext-imagick is already in CI's PHP_EXTENSIONS, so generation tests
    need no workflow change

U1 — Assets service + plugin wiring

  • Registers an assets component with a typed getAssets() getter and
    @property-read, establishing the convention that every component gets both
  • Adds the make() seam returning a MockAssetBuilder (a minimal stub here;
    fluent setters / configure() / defaults arrive in U3, config application
    and URL signing in U5)

Testing

  • ddev test unit — 13 tests, 34 assertions pass (4 new wiring/seam tests,
    written test-first; 9 pre-existing, no regressions)
  • ddev phpstan — clean (level 4)
  • ddev composer check-cs — clean (ECS)

Scope notes

  • Deliberately foundation-only; U2+ (ext-imagick, builder, element, controller,
    Imager X) land in stacked follow-up PRs.
  • MockAssetBuilder is intentionally an empty stub at this stage.

- Restructure 4 phases into 12 test-first implementation units (U1–U12)
- Add Testing Strategy: unit/functional split, harness affordances, manual-only items
- Map every AC/NFR to a concrete Codeception test file
- Reframe Phase 1 as greenfield scaffolding (feature is unscaffolded; no WIP to fix)
- Note ext-imagick already present in CI; quality gates swapped to automated
- Register `assets` component with getAssets() getter + @property-read
- Add make() seam returning a MockAssetBuilder stub (fleshed out in U3/U5)
- Establish convention: each component gets a typed getter + @property-read
- Cover wiring with PluginWiringTest and AssetsTest (test-first)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant