library-dual-testsuite-maplisted
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`