# Site Content catalog test normalization

Audience: AI coding agents first.

- **Plan ID:** `IPZ-SITE-CONTENT-CATALOG-TEST-NORMALIZATION-2026-08-14`
- **Task:** `#90`
- **Status:** ACTIVE
- **Outcome:** Make the dormant Site Content catalog unit test directly PHPCS-clean by moving its namespaced WordPress function fixtures into a dedicated fixture file and normalizing documentation and array layout without changing test behavior.
- **Source request:** On an isolated branch based on current `origin/master`, normalize only `SiteContentCatalogTest.php` and a dedicated new fixture under `tests/Fixtures/SiteContent/`; verify the focused suite and PHP/PHPCS gates; commit locally. After both independent reviews approved Task #90, publish through the named repository controller from `/tmp`, using only its documented exit-20 recovery and never a raw merge or push.
- **Preserved WIP/ref/path:** Task #88 remains uncommitted and untouched at `/home/user/Projects/Press.zone/wordpress/wp-content/.claude/worktrees/agent-a8b578133cd53f05f`. Preserve all unrelated existing changes in this worktree unchanged.
- **Allowed implementation paths:**
  - `plugins/international-press-zone/tests/Unit/SiteContent/SiteContentCatalogTest.php`
  - One dedicated new PHP fixture under `plugins/international-press-zone/tests/Fixtures/SiteContent/`
- **Registry paths:**
  - `plugins/international-press-zone/docs/plans/2026-08-14-site-content-catalog-test-normalization.md`
  - `plugins/international-press-zone/docs/plans/INDEX.md`
  - `docs/plans/INDEX.md`
- **Acceptance criteria:**
  1. Move every namespaced WordPress fixture function out of `SiteContentCatalogTest.php` into one dedicated fixture file loaded by the test.
  2. Normalize test documentation and array layout only as required for direct PHPCS cleanliness while preserving every test and assertion behavior exactly.
  3. Change no production code, contracts, suppressions, baselines, runtime wiring, hooks, routes, jobs, UI, activation, or unrelated code.
  4. Focused `SiteContentCatalogTest` PHPUnit, PHP syntax for both changed PHP files, direct PHPCS on both files, candidate-aware PHPCS, and `git diff --check` all pass without warnings or errors.
  5. Carefully inspect the bounded diff for correctness and security, then create one local terse imperative commit without co-author or publication.
- **Constraints:** Work directly without delegation, skills, other models, or remote/client WordPress contact. Keep behavior neutral and scope surgical. Address every warning and error. Parent owns independent reviews and controller publication.
- **Execution steps:** Register this ACTIVE plan in both indexes; establish direct PHPCS findings; create and load the dedicated fixture; normalize only documented test formatting; run all required gates; inspect status and diff; update receipt and next action; commit locally; record the commit receipt and set IDLE.
- **Current receipt:** Fetched `origin/master` and fast-forwarded this isolated branch from `ea5dff2a2` to current `f670bc66f`; the bounded task paths were clean before edits. Task #88 remains untouched at its recorded worktree. Moved catalog-specific namespaced WordPress seams into `tests/Fixtures/SiteContent/SiteContentCatalogFixture.php`, loaded that fixture from the unit test, converted the test to one unbracketed namespace, added required test documentation, and normalized only PHPCS-required layout. Focused PHPUnit passes `7 tests, 28 assertions`; both changed PHP files pass syntax checks; direct PHPCS on both files is clean; candidate-aware PHPCS is clean; and `git diff --check` is clean. Careful local inspection found no production/runtime changes, no altered assertions or test cases, and no new security exposure; this is not an independent review. Locked development dependencies were installed only in the ignored plugin `vendor/` directory because this isolated worktree initially had no PHPCS/PHPUnit binaries. Local implementation commit is `b5200960763cdfb6c011b2d444810c61c41b09ae`. Both independent review passes approved Task #90; controller publication is now executing.
- **Next executable action:** Commit this publication receipt update, then run the named repository controller from `/tmp` in the foreground with full timeout.
