Quick Test Runner
Scope mapping
Run the minimum scope for the changed files. Prefer narrow over broad.
| Changed | Command | Notes |
|---|---|---|
src/php/** |
composer test-compiler |
PHPUnit unit + integration |
src/phel/** |
composer test-core |
Phel core tests |
src/php/Compiler/** |
composer test-compiler |
Full compiler suite |
| Single PHP module | ./vendor/bin/phpunit --filter=ModuleName |
Fastest for focused work |
| Single Phel file | ./bin/phel test tests/phel/<file> |
Target a specific test |
Any .php style change |
composer test-quality |
Static analysis only |
| Mixed PHP + Phel | composer test |
Run everything |
Available composer scripts:
composer test # All tests (quality + compiler + core)
composer test-quality # Static analysis: cs-fixer, psalm, phpstan, rector
composer test-compiler # PHPUnit unit + integration tests
composer test-core # Phel core tests (./bin/phel test)
composer fix # Auto-fix: rector + cs-fixer
Instructions
If
$ARGUMENTSis empty orall:composer testIf
$ARGUMENTSis a known scope:quality→composer test-qualitycompiler→composer test-compilercore→composer test-corequick→composer test-compiler && composer test-core(skip static analysis)bench→composer phpbench
If
$ARGUMENTSlooks like a test class or method name:./vendor/bin/phpunit --filter "$ARGUMENTS"If
$ARGUMENTSlooks like a file path:./vendor/bin/phpunit "$ARGUMENTS" # or for Phel tests: ./bin/phel test "$ARGUMENTS"Report results clearly with pass/fail count.