← ClaudeAtlas

library-dual-testsuite-maplisted

Map edited file paths to the correct testsuite(s) for libraries with a framework-agnostic Core layer and a framework-specific glue layer. Use when editing any `src/**` file in a library whose phpunit.xml declares multiple testsuites (commonly `core` + `laravel`, or `core` + `symfony`, etc.) and you need to know which `composer test:*` command(s) to run. Saves the round-trip of "I ran the wrong suite, the failing test is in the other one". Companion to (not duplicate of) `polyfill-version-matrix-audit` which works at the version-guard level; this skill works at the directory level.
hmj1026/dhpk · ★ 1 · Testing & QA · score 72
Install: claude install-skill hmj1026/dhpk
# Library dual-testsuite map A library that supports multiple framework majors typically splits its source into: ``` src/ ├── Core/ # framework-agnostic — no Illuminate / Symfony imports └── <Framework>/ # glue layer — pulls in container, facades, etc. ``` And mirrors the split in tests: ``` tests/ ├── Core/ # boots no container └── <Framework>/ # boots Testbench / Symfony Kernel / etc. ``` The phpunit.xml declares both as testsuites: ```xml <testsuites> <testsuite name="core"><directory>tests/Core</directory></testsuite> <testsuite name="laravel"><directory>tests/Laravel</directory></testsuite> </testsuites> ``` And composer.json exposes them as scripts: ```json "scripts": { "test:core": "phpunit --testsuite=core", "test:laravel": "phpunit --testsuite=laravel", "test:unit": ["@test:core", "@test:laravel"] } ``` **The skill:** given an edited file path, tell the developer which testsuite to run (or both). --- ## When to run - After editing any `src/**` file - After editing any `tests/**` file - When the user asks "which tests should I run?" ## When NOT to run - Projects with a single testsuite — this skill has nothing to do - E2E / integration tests in a separate dir (e.g. `tests/Integration/`) that runs in CI but not locally --- ## Decision rules Read `phpunit.xml` for the testsuite-to-directory mapping. Then apply: | Edit location | Run | |---------------|-----| | `src/Core/**` only | `composer test:core`