fair-plugin/infection.json
Chuck Adams d5b0f82b9c
feat: complete remaining active testing gaps
Six items from the testing plan, now done:

1. install-activate-update.spec.ts (@slow) — full install/activate/update
   flow via Direct Install tab. Mock server extended with hello-dolly DID
   fixtures (did-doc + metadata-doc) and zip artifact serving route
   at /artifacts/*.zip.

2. avatar-upload.spec.ts — profile page rendering, avatar section
   presence, display name accessibility. Avatar image verification
   handles Gravatar rate-limiting (at least one loaded = pass).

3. update-error-row.spec.ts — plugins page structure, FAIR error row
   detection, no JS errors on plugins page.

4. SignatureVerificationIntegrationTest.php — 5 tests running inside
   Docker WP container. Covers verify_file_signature() (WP 5.2+) with
   live sodium Ed25519 keys, tampered file rejection, missing-key
   rejection, wrong-signature rejection, key encoding round-trip.
   NB: WP 6.4 uses SHA-384 (not SHA-512) for file hashing.

5. Coverage reporting in CI — added dedicated 'coverage' job to
   phpunit-tests.yml. Runs on push to main/development/release only,
   uses PHP 8.4 + XDebug, uploads HTML coverage artifact.

6. minMsi threshold — set minMsi=9 (current baseline), minCoveredMsi=90.

Updated mock server:
  - /artifacts/<file.zip> route serves zips from tests/fixtures/zips/
  - hello-dolly DID/meta fixtures for browser install flow

Updated integration bootstrap:
  - require wp-admin/includes/file.php for verify_file_signature()

Totals: 262 unit (489 assertions), 17 integration (48), 12 HTTP (38),
23 browser (non-slow), 3 browser (@slow). Exit code 0.

Signed-off-by: Chuck Adams <chaz@chaz.works>
2026-06-09 19:15:38 -06:00

36 lines
1,002 B
JSON

{
"$schema": "vendor/infection/infection/resources/schema.json",
"source": {
"directories": [
"inc"
],
"excludes": [
"inc/packages/admin",
"inc/packages/wp-cli",
"inc/compatibility",
"inc/repositories",
"inc/upgrades",
"inc/settings",
"inc/updater/class-lite.php",
"inc/updater/class-pluginpackage.php",
"inc/updater/class-themepackage.php"
]
},
"logs": {
"text": "tests/unit/infection/infection.log",
"html": "tests/unit/infection/infection.html",
"summary": "tests/unit/infection/summary.log"
},
"mutators": {
"@default": true
},
"testFramework": "phpunit",
"phpUnit": {
"configDir": "tests/unit",
"customPath": "vendor/phpunit/phpunit/phpunit"
},
"bootstrap": "tests/infection-bootstrap.php",
"timeout": 45,
"minMsi": 9,
"minCoveredMsi": 90
}